This topic is: not resolved
- This topic has 29 replies, 7 voices, and was last updated 11 years, 5 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing Page Titles | Pretty Pictures Theme
Tagged: page titles, pretty pictures
Note: A Post formats UI maybe included in the next version of WordPress 3.6 and added to the editor.
Please 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.
Thanks, 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
Use the conditional tag for single pages and it will work as long as you remove the post formats code.
I'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'
);
function
child_remove_page_titles() {
if
( !is_page() || is_single() ) {
remove_action(
'genesis_page_title'
,
'genesis_do_page_title'
);
}
}
Not 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.
I think i have worked it out using CSS.
.page-template-default .entry-title { display:none; }
The 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
Hi 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.
© 2024 WPEngine, Inc.