Archive Pages Aren't Showing Accurately

This topic contains 20 replies, has 4 voices, and was last updated by  Will Hill 4 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #515937

    Will Hill
    Full Member
    Post count: 73

    I had archive pages set up for different CPT’s that were all working right. Now, the page looks right, but when the archive actually pulls the layout it isn’t.

    For example, the archive page for events can be seen here: https://county10.com/gd-archive-2-2/
    It looks good, and it has been set in the Events settings as the archive page.

    But if you go to view all events here: https://county10.com/events/
    the shortcodes get huge and push the sidebar to the bottom of the page.

    Any ideas? I feel like I’ve pestered you support guys a lot, but you’ve been very helpful and I really appreciate it.

    #515953

    Kor
    Moderator
    Post count: 16516

    Hi Will Hill,

    Thanks for your post. I can’t seem to open this page https://county10.com/gd-archive-2-2/ to compare the layout https://county10.com/events/ . Do I need Administrative access?

    #515997

    Will Hill
    Full Member
    Post count: 73
    This reply has been marked as private.
    #516039

    Will Hill
    Full Member
    Post count: 73
    This reply has been marked as private.
    #516042

    Will Hill
    Full Member
    Post count: 73

    Individual Event/Place listings are also showing the same general explosion

    #516194

    Will Hill
    Full Member
    Post count: 73

    As I’ve investigated, the styling looks fine when not using the Divi Builder, and this problem showed up after updating to Divi 4.0, so there must be some kind of miscommunication between Divi and the GD shortcodes now.

    #516365

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #516368

    Will Hill
    Full Member
    Post count: 73
    This reply has been marked as private.
    #516377

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #516380

    Will Hill
    Full Member
    Post count: 73
    This reply has been marked as private.
    #516410

    Kiran
    Moderator
    Post count: 7069

    Hi Will,

    Try adding following PHP snippet in child theme functions.php to fix empty results page issue.

    
    
    /**
     * Fix GeoDirectory + Divi theme search empty results page.
     */
    if ( ! function_exists( 'et_pb_is_pagebuilder_used' ) ) {
    	function et_pb_is_pagebuilder_used( $page_id = 0 ) {
    		if ( 0 === $page_id ) {
    			$page_id = et_core_page_resource_get_the_ID();
    		}
    
    		global $wp_query;
    
    		if ( empty( $page_id ) && ! empty( $wp_query ) && $wp_query->is_main_query() && function_exists( 'geodir_is_geodir_page' ) && geodir_is_geodir_page() ) {
    			if ( geodir_is_page( 'search' ) ) {
    				$page_id = geodir_search_page_id();
    			} elseif ( geodir_is_page( 'archive' ) || geodir_is_page( 'post_type' ) ) {
    				$page_id = geodir_archive_page_id( ( ! empty( $wp_query->query_vars['post_type'] ) ? $wp_query->query_vars['post_type'] : '' ) );
    			}
    		}
    
    		return (
    			'on' === get_post_meta( $page_id, '_et_pb_use_builder', true ) ||
    			// Divi layout post type always use the builder
    			'et_pb_layout' === get_post_type( $page_id ) ||
    			// Extra Category post type always use the builder
    			'layout' === get_post_type( $page_id )
    		);
    	}
    }

    Regards,
    Kiran

    #516436

    Will Hill
    Full Member
    Post count: 73

    Kiran,

    When I use the I get this:
    “Syntax Error, Unexpected T_Function” and it crashes the site. It flags that error on the first line of the code (not the comments)

    #516557

    Kiran
    Moderator
    Post count: 7069

    Hi Will,

    Let us know where you put above snippet and provide us page url where you seen this error.

    If possible provide us FTP credentials so i can apply & check patch from my side.

    Regards,
    Kiran

    #516641

    Will Hill
    Full Member
    Post count: 73
    This reply has been marked as private.
    #516709

    Kiran
    Moderator
    Post count: 7069

    Hi Will,

    I have corrected code and added above snippet in your child theme functions.php.

    Please check and let us know.

    Reghards,
    Kiran

Viewing 15 posts - 1 through 15 (of 21 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount