Community Forums › Forums › Design Tips and Tricks › Removing Page Titles | Pretty Pictures Theme
Tagged: page titles, pretty pictures
This topic contains 29 replies, has 7 voices, and was last updated by braddalton 2 days, 7 hours ago.
-
AuthorPosts
-
January 31, 2013 at 9:34 pm #16964
I would also like this to be resolved. If I use the Genesis Title Toggle plugin I can remove the title from my home “page”. But if I put the following code at the end of home.php in Balance theme it has no effect.
remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
From everything I read it really should work. I`ve also tried the whole functions.php thing as well to no avail. There is a whole bunch of white space I would really like to remove to make the home page a bit more voter / mobile friendly.
February 12, 2013 at 9:31 am #19824Is this resolved now?
Here’s a good tutorial on removing titles using conditional tags
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 12, 2013 at 11:10 am #19845More ignored rather than resolved. I’ve put the code in various different places including functions.php and home.php without effect.
February 12, 2013 at 6:27 pm #19968Hi, Brad.
I used the code for removing page titles… but now it’s removed the blog post titles on the blog page.
So frustrating!
Any ideas on what to do?
Kimberly
February 14, 2013 at 3:48 am #20268Remove this code from your child themes functions file if you are NOT using or planning on using post formats.
Backup the file first.
/** Add support for post formats */ add_theme_support( 'post-formats', array( 'gallery', 'quote' ) ); /** Remove elements for post formats */ add_action( 'genesis_before_post', 'pp_remove_elements' ); function pp_remove_elements() { // Remove if post has quote format if ( has_post_format( 'quote' ) ) { remove_action( 'genesis_before_post_content', 'genesis_post_info' ); remove_action( 'genesis_post_title', 'genesis_do_post_title' ); remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); } // Remove if post has gallery format elseif ( has_post_format( 'gallery' ) ) { add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); } // Add back, as post has no format else { add_action( 'genesis_before_post_content', 'genesis_post_info' ); add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); } }Then add this code to the end of your child themes functions.php file.
This will remove the page titles from all single pages. You can change the conditional tag to remove titles from other pages, posts etc.
//remove page titles only sitewide add_action('get_header', 'child_remove_page_titles'); function child_remove_page_titles() { if ( is_page() ) { remove_action('genesis_post_title', 'genesis_do_post_title'); } }
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 14, 2013 at 3:55 am #20269Note: A Post formats UI maybe included in the next version of WordPress 3.6 and added to the editor.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 14, 2013 at 4:24 am #20272Please let me know if this is what you wanted.
add_action('get_header', 'child_remove_page_titles'); function child_remove_page_titles() { if ( !is_page() || is_single() ) { remove_action('genesis_post_title', 'genesis_do_post_title'); } }This code removes titles from all single posts but not single pages or archive pages like your blog page.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 19, 2013 at 5:29 pm #21502Thanks, Brad!
I don’t think I was clear…
I’m trying to remove the titles from the single pages, not single posts.
I still can’t get it to work.
-Kimberly
February 20, 2013 at 12:04 am #21569Use the conditional tag for single pages and it will work as long as you remove the post formats code.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 20, 2013 at 3:33 pm #21811I’m such a coding rookie…
So I copy and paste the code you put (above my last reply), but I change the conditional tag to look like this:
add_action('get_header','child_remove_page_titles');
functionchild_remove_page_titles() {
if( !is_page() || is_single() ) {
remove_action('genesis_page_title','genesis_do_page_title');
}
}February 22, 2013 at 2:02 pm #22277Not sure of the conditional statements to use. The guys on the WordPress Codex aren’t either. Been a hard a few weeks mentally with all the coding. Hopefully i can work it out for you soon.
The function works so its just a matter of working out which tags to use in the function.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 22, 2013 at 2:11 pm #22279I think i have worked it out using CSS.
.page-template-default .entry-title { display:none; }
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.May 16, 2013 at 1:33 pm #41247The Toggle pluggin works great if you check on each page that you don’t want the title to show. Then the blog titles will still show. If you click the box inside the Genesis theme options to remove every header by default then it takes out the blog titles too
May 20, 2013 at 11:32 pm #41968Hi Brad
I typed in your suggestion -into the functions.php at the end as suggested.
/**remove page titles only sitewide*/
add_action(‘get_header’, ‘child_remove_page_titles’);
function child_remove_page_titles() {
if ( is_page() ) {
remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
}It works a treat! thanks – this was really bugging me.
May 21, 2013 at 12:47 am #41980No worries Karino.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered. -
AuthorPosts
You must be logged in to reply to this topic.