Home › Forums › Support › Page Header page name This topic has 7 replies, 2 voices, and was last updated 8 years, 7 months ago by Tom. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts February 18, 2015 at 10:58 am #76326 Jean Paiva Developer Hey Tom, I’m trying to call the title of the pages/posts on the Page Header addon not in the “content-page.php”. Image: I was looking at the addon files, but I didn’t found any filter/action to use in my child theme. You have any clue how can I do that? February 18, 2015 at 12:34 pm #76362 TomLead Developer Lead Developer You can always add it manually, but you’re trying to add it automatically, correct? February 18, 2015 at 12:59 pm #76389 Jean Paiva Developer Yes. There’s a way that calling the function “generate_page_header_area” on my theme and then I echo the “the_title();” ? Maybe a hook do that, right? February 18, 2015 at 1:13 pm #76421 TomLead Developer Lead Developer Hmm, well the page header area will only show if some sort of content/image is added to the metabox. You could try something like this (untested): add_action('generate_after_header','generate_add_title_below_header'); function generate_add_title_below_header() { // If we're not on a page, don't do anything if ( ! is_page() ) return; ?> <div class="page-header-content generate-page-header generate-content-header"> <div class="inside-page-header-container inside-content-header grid-container grid-parent"> <?php the_title(); ?> </div> </div> <?php } You can add that snippet using a plugin like this: https://wordpress.org/plugins/code-snippets/ Let me know – it may need some tweaking ๐ February 18, 2015 at 3:45 pm #76472 Jean Paiva Developer That’s it! Sometimes I forget the use of GP Hooks! One last question, if I want to do the same to posts? And only exclude the homepage? Thank you so much for your time Tom! And again, awesome job with the GP! February 19, 2015 at 12:07 am #76538 TomLead Developer Lead Developer Then I would change the code to this: add_action('generate_after_header','generate_add_title_below_header'); function generate_add_title_below_header() { // If we're not on a page, don't do anything if ( is_page() || is_single() ) { ?> <div class="page-header-content generate-page-header generate-content-header"> <div class="inside-page-header-container inside-content-header grid-container grid-parent"> <?php the_title(); ?> </div> </div> <?php } } February 19, 2015 at 4:52 am #76610 Jean Paiva Developer Thank you once again Tom! February 19, 2015 at 10:09 am #76810 TomLead Developer Lead Developer You’re welcome ๐ Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In