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 4 weeks ago.
-
AuthorPosts
-
January 22, 2013 at 3:01 pm #13839
Hi!
I used the following code but the page titles are still there.
/** Remove page titles */
add_action( ‘get_header’, ‘child_remove_page_titles’ );
function child_remove_page_titles() {
if ( is_page() && ! is_page_template( ‘page_blog.php’ ) )
remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
}Help!
Kimberly
January 22, 2013 at 3:31 pm #13852I’ve written a tutorial on this as there’s different ways to hide page titles in WordPress themes.
Where did you get the php for this?
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 22, 2013 at 3:38 pm #13853Thanks, Brad. Great tutorial!
I’m wondering if there is a way to remove titles from all my websites pages instead of doing it one by one for specific pages. I remember I did this on a previous child theme I used but I don’t recall how.
BTW, I got the code from searching on this forum. There are quite a few posts, not sure which one I grabbed it from – but it was used in a few of them.
Cheers,
Kimberly
January 22, 2013 at 3:46 pm #13856Bills plugin: Genesis Title Toggle
http://wordpress.org/extend/plugins/genesis-title-toggle/
Haven’t tested this plugin but it should do the job based on the description.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 22, 2013 at 4:43 pm #13877Delete this line
add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
from
// 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’ );
}
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 22, 2013 at 4:59 pm #13892@SoZo… I don’t see the snippet. Here’s what I have:
/** 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_post_title’, ‘genesis_do_post_title’ );
add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
}@Brad – excellent plugin… except it also removed my header picture on the blog post pages. Strange!
January 22, 2013 at 5:00 pm #13893The last one
// Add back, as post has no format
else {
add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
}
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 22, 2013 at 5:07 pm #13898Hmmmm….
That removes my header picture whenever I’m on a blog page.
My “about”, “contact”, and “amplify your brand” pages have my header picture.
The “homepage”, “brandspiration” and “praise” pages (all blog formats) don’t.
http://www.kimberlybordonaro.com
January 22, 2013 at 6:01 pm #13915Ok, put that line back and then use this (not sure why but I wrote it out from scratch instead of copy/pasting and it’s working for me)
/** Remove page titles */
add_action(‘get_header’, ‘child_remove_page_titles’);
function child_remove_page_titles() {
if (is_page() && ! is_page_template( ‘page_blog.php’ ) )
remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
}
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 22, 2013 at 7:56 pm #13954I don’t get it…
I did exactly as you said and put back the original code, but it is still taking out my header image on blog page, including the front page.
January 22, 2013 at 7:59 pm #13955Okay, I redid it. Now the header image is back to normal…
But, the added code isn’t removing the page titles.
January 22, 2013 at 8:00 pm #13956PS, You are so awesome John. I really appreciate your help.
January 22, 2013 at 8:57 pm #13967i added the title toggler plugin to do the same thing on my agency blog:
it works, yet not sure if the added plugin slows down loading or just changes the php once for each page.
adam
January 23, 2013 at 6:35 am #14032‘@Brad – excellent plugin… except it also removed my header picture on the blog post pages. Strange!’
l’ll pass that onto Bill Erickson who’s the plugin author because it shouldn”t do that.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 23, 2013 at 10:36 pm #14237Thanks, Brad.
If anyone has suggestions on how to the resolve this issue, please chime in. I’d greatly appreciate it.
-
AuthorPosts
You must be logged in to reply to this topic.