Community Forums › Forums › Archived Forums › General Discussion › My blog summary switched to 3-column view with a recent update – how can I fix?
- This topic has 7 replies, 2 voices, and was last updated 7 years, 4 months ago by brookscl.
-
AuthorPosts
-
December 20, 2016 at 9:56 am #197893brooksclMember
Sometime in the past month or two, I believe an update to WordPress or Genesis changed my posts page from a single column with right sidebar layout to this three column layout:
I use the Generate Pro theme.
I've scoured my CSS, functions.php, and settings and can't find anything that may be the culprit. My category archives look just fine:
https://wingt-coach.com/category/featured/
Any tips on where to look to troubleshoot this? I do have this customization to turn on the three-column grid loop on my home page:
https://wingt-coach.com/blog///* Have the genesis grid loop work on home page function cb_archive_post_class( $classes ) { global $wp_query; if ( $wp_query->is_main_query() ) { return $classes; } $classes[] = 'one-third'; if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 ) $classes[] = 'first'; return $classes; }
December 20, 2016 at 11:29 am #197901Victor FontModeratorhttp://www.studiopress.community/topic/wordpress-4-7-and-sidebar-issues-please-upgrade-genesis/
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 20, 2016 at 11:38 am #197903brooksclMemberI'm on Genesis 2.4.2, WordPress 4.7, Generate Pro 2.1.
December 20, 2016 at 11:41 am #197904brooksclMemberI'm going to try to update Generate Pro 2.1 to 2.1.1. Need to do some diff/merge first...
December 20, 2016 at 12:18 pm #197908Victor FontModeratorAdding the column classes is what's causing the 3-column layout. You're seeing exactly what your custom code is telling it to do.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 20, 2016 at 12:32 pm #197909brooksclMemberMy column classes hook is only designed to invoke on the front page. I've experimented with removing that hook, and it breaks my home page (the columns go away) and has no effect on the blog archive page. Which leads me to believe the problem lies elsewhere.
I agree with you that the custom code seemed to be the most likely culprit. The one-third CSS class is definitely getting added to the <article> tags on the summary page.
December 20, 2016 at 12:37 pm #197911Victor FontModeratorIf you want it on the front page only, you have to wrap the code in a conditional. The way the code is written it applies to the loop anywhere it runs. You need to test for is_front_page() or is_home().
//* Have the genesis grid loop work on home page function cb_archive_post_class( $classes ) { global $wp_query; if ( $wp_query->is_main_query() && ! ( is_front_page() || is_home() ) ) { return $classes; } $classes[] = 'one-third'; if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 ) $classes[] = 'first'; return $classes; }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 20, 2016 at 12:49 pm #197914brooksclMemberThanks, I'm definitely getting closer to resolving it. The conditionals are returning some odd results, but clearly this is the code that needs to be fixed. I'm sure I'll have it resolved soon - thanks so much for the help.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.