Archive Pages Aren't Showing Accurately
This topic contains 20 replies, has 4 voices, and was last updated by Will Hill 5 years, 11 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: divi, empty results, no posts, search
-
AuthorPosts
-
November 4, 2019 at 10:57 pm #515937
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.
November 5, 2019 at 6:33 am #515953Hi 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?
November 5, 2019 at 2:04 pm #515997This reply has been marked as private.November 5, 2019 at 5:47 pm #516039This reply has been marked as private.November 5, 2019 at 6:05 pm #516042Individual Event/Place listings are also showing the same general explosion
November 6, 2019 at 9:03 pm #516194As 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.
November 7, 2019 at 11:23 pm #516365This reply has been marked as private.November 7, 2019 at 11:41 pm #516368This reply has been marked as private.November 8, 2019 at 12:45 am #516377This reply has been marked as private.November 8, 2019 at 2:17 am #516380This reply has been marked as private.November 8, 2019 at 10:09 am #516410Hi 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,
KiranNovember 8, 2019 at 2:23 pm #516436Kiran,
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)November 11, 2019 at 6:35 am #516557Hi 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,
KiranNovember 11, 2019 at 3:35 pm #516641This reply has been marked as private.November 12, 2019 at 8:27 am #516709Hi Will,
I have corrected code and added above snippet in your child theme functions.php.
Please check and let us know.
Reghards,
Kiran -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket