Community Forums › Forums › Archived Forums › General Discussion › How to remove the archive-description on blog page
- This topic has 3 replies, 2 voices, and was last updated 8 years, 1 month ago by carasmo.
-
AuthorPosts
-
February 22, 2016 at 6:33 pm #179663BensogoMember
I have remposition the title / description for singles, pages and archives pages of the website, and it works well.
However, on the BLOG page, the one considered as blog per wordpress settings, the archive description is displayed 2 times, one time on top and one more time on top of posts list.
I tried many thing but didn't find a way to remove it.Thanks for your help, I copy the code I use to remove / reposition title and description in different pages / posts of the theme.
//* Remove page titles from all single pages add_action( 'get_header', 'remove_titles_all_single_pages' ); function remove_titles_all_single_pages() { if ( is_singular('page') ) { remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); } } //* Reposition the entry title for all single pages add_action('genesis_after_header','gn_page_title', 10); function gn_page_title(){ if ( is_singular('page') ) { echo '<div class="fullSection_pageTitle"> <h1>' . get_the_title() . '</h1> </div>'; } } //* Reposition the entry title for all single posts add_action( 'get_header', 'reposition_single_entry_header' ); function reposition_single_entry_header() { if ( is_singular('post') ) : remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); add_action( 'genesis_after_header', 'genesis_entry_header_markup_open', 5 ); add_action( 'genesis_after_header', 'genesis_do_post_title' ); add_action( 'genesis_after_header', 'genesis_entry_header_markup_close', 15 ); endif; } //* Reposition archives description - title + description just after header remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description', 15 );
I cannot show any link for now website is not online yet.
Thanks a lot 🙂
February 22, 2016 at 6:46 pm #179667carasmoParticipantI had double titles and the description was in a place I didn't want, on my CPT, this did it for me. I had to open up Genesis to find it:
//* Remove the archive description and title remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' );
February 22, 2016 at 6:50 pm #179670carasmoParticipantAhh, I see you are not using a CPT, this is the actual index page (the blog page).
You can look in the archive.php page in Genesis and find:
add_action( 'genesis_before_loop', 'genesis_do_blog_template_heading' );
So remove_action... will work. Hopefully this does it, I haven't needed it.
February 22, 2016 at 6:51 pm #179671carasmoParticipantremove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' );
This one might be the one. Read the very excellently commented code in archive.php
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.