Community Forums › Forums › Design Tips and Tricks › How To Hide Page Titles On Specific Pages
Tagged: conditional, Prose
This topic contains 1 reply, has 2 voices, and was last updated by SoZo 6 months, 3 weeks ago.
-
AuthorPosts
-
November 28, 2012 at 2:34 pm #2110
I’m using the following code to hide titles on my site.
It works like a champ!/** Remove page titles */ add_action( 'get_header', 'child_remove_page_titles' ); function child_remove_page_titles() { if ( is_page() && ! is_page_template( 'landing.php' ) ) remove_action( 'genesis_post_title', 'genesis_do_post_title' ); }>>The problem is it hides ALL titles on the site, including the homepage, instead of just hiding them on the landing.php template
The code snippet was entered here: Genesis > Custom Code > Custom Functions
We’re using Prose v.1.8.2Any ideas how to hide titles strictly on our landing pages and display them everywhere else?
Thanks,
~RB-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
-
This topic was modified 6 months, 3 weeks ago by
bravomedia.
November 28, 2012 at 5:02 pm #2164You’d need to edit the conditional code. This statement ”! is_page_template( ‘landing.php’ )” is saying DON”T do this on the any page using the landing page template. The “!” is the not statement. And unless you edited your landing page template the template that is usually included with Genesis themes is “page_landing.php”.
You could also do away with the code altogher and get the Genesis Title Toggle plugin.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
-
This topic was modified 6 months, 3 weeks ago by
-
AuthorPosts
You must be logged in to reply to this topic.