Community Forums › Forums › Archived Forums › General Discussion › Category Archive Page – first post broken hooks
Tagged: archive, broken hooks, category, foodie pro, loop
- This topic has 4 replies, 3 voices, and was last updated 8 years, 4 months ago by Adrien Sanborn.
-
AuthorPosts
-
December 4, 2015 at 9:56 pm #172800Adrien SanbornMember
Hey guys! I'm using Foodie Pro and I'm trying to customize the Category Archive pages. I used Bill Erickson's "better Genesis Grid Loop" trick to set Genesis column classes -- that worked like a charm.
The next thing I tried to do was to move the Post titles down below the Featured Image for each post on the Category Archive page.
However, it can't be modified using hooks the same way as all the other posts on the page. The theme seems to consider the second actual post as the first post in the loop.
Has anyone seen this before, or know why this might be?
Thanks for any help!
I’ve accepted the challenge! I’ll be answering at least 1 unanswered post per week.
December 4, 2015 at 9:59 pm #172802Brad DaltonParticipantDecember 5, 2015 at 2:05 am #172812December 5, 2015 at 8:06 pm #172851Adrien SanbornMemberSorry for the delay folks! Here are all my functions.php additions.
/********* Styles ~ replace w/ custom ***********************/ remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); // Custom.css ~ Register & Enqueue function AMS_custom_styles() { // url for custom CSS file $custom_style_dir = CHILD_URL . '/css/custom.css'; // register & enqueue wp_register_style( 'ams-custom-styles', $custom_style_dir, '', '', 'screen' ); wp_enqueue_style( 'ams-custom-styles', $custom_style_dir, '', '', 'screen' ); } add_action( 'wp_enqueue_scripts', 'AMS_custom_styles' ); /********* Content Output ~ Single Post ***********************/ // Kill Post Meta ~ after title function AMS_kill_single_meta() { if( is_single() ): remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); endif; } add_action( 'genesis_entry_header', 'AMS_kill_single_meta' ); /**************************************************************** Posts Index & Archive Settings ****************************************************************/ /********* Columns *********/ function AMS_archive_columns( $classes ) { global $wp_query; $paged = $wp_query->get( 'paged' ); if( ! is_single() ) { // not single if ( is_archive() ) { // CAT archive pages $classes[] = 'one-third'; // clear rows if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 ): $classes[] = 'first'; endif; } elseif ( $paged ) { // blog pages // not 1st post if( $wp_query->current_post > 0 ): $classes[] = 'one-third'; else: $classes[] = 'top-post'; endif; // clear rows if( 1 == $wp_query->current_post || 0 == ($wp_query->current_post - 1) % 3 ): $classes[] = 'first'; endif; } // paginated or archive } // not single return $classes; } add_filter( 'post_class', 'AMS_archive_columns' ); /********* Title Position *********/ /*** Blog Index Title - kill ***/ function AMS_post_index_title_kill() { global $wp_query; $paged = $wp_query->get( 'paged' ); if ( $paged || is_archive() ): remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); endif; } add_action( 'genesis_entry_header', 'AMS_post_index_title_kill' ); /*** Blog Index Title - replace ***/ function AMS_index_title_before_excerpt() { add_action( 'genesis_entry_content', 'genesis_do_post_title', 8 ); } add_action( 'genesis_entry_content', 'AMS_index_title_before_excerpt' ); /********* Post Meta *********/ /*** header entry meta ***/ function AMS_posts_index_remove_header_meta() { global $wp_query; $paged = $wp_query->get( 'paged' ); if ( $paged || is_archive() ): remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); endif; } add_action( 'genesis_entry_header', 'AMS_posts_index_remove_header_meta' ); /*** Footer Entry Meta ***/ function AMS_posts_index_remove_footer_meta() { remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); } add_action( 'genesis_entry_footer', 'AMS_posts_index_remove_footer_meta' );
I’ve accepted the challenge! I’ll be answering at least 1 unanswered post per week.
December 6, 2015 at 11:36 pm #172907Adrien SanbornMemberGood news? Useful lesson? Are we being spammed?
If not, then the useful lesson must be referring to the column classes "Better Grid Loop". And yes, that's an awesome trick.
On a more relevant note; Should this be posted as a support request? It's more of a technical problem than an optional customization...
Thanks guys.
I’ve accepted the challenge! I’ll be answering at least 1 unanswered post per week.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.