• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Blog template Page Title Not Showing

Welcome!

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.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Blog template Page Title Not Showing

This topic is: not resolved

Tagged: blog, page, template, title

  • This topic has 15 replies, 3 voices, and was last updated 8 years, 6 months ago by Josephine.
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • October 20, 2014 at 11:59 pm #128569
    meghanwagner
    Member

    I am attempting to put the title 'blog' on the blog page while using the blog-page.php template.

    I have tried:
    add_action( 'genesis_loop', 'genesis_standard_loop', 5 );

    but it doesn't work,

    I've also tried a few functions along this line:
    add_action( 'get_header', 'add_title_to_blog' );
    function add_title_to_blog() {
    if (is_page_template('blog-page.php') ) {
    add_action( 'genesis_entry_header', 'genesis_do_post_title' );
    }
    }

    But nothing is working.
    I feel like I am missing something...
    Any help would be greatly appreciated.

    http://carecap.com/blog/
    October 21, 2014 at 12:30 am #128573
    Genesis Developer
    Member

    Try this code. Add the code in page_blog.php file

    add_action('genesis_loop', 'add_title_to_blog', 5);
    function add_title_to_blog(){
      echo '<h1 class="entry-title"> ' . get_the_title() . '</h1>' . "\n";
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    October 21, 2014 at 9:03 am #128647
    meghanwagner
    Member

    Nope doesn't work. Would it be possible to have something that is blocking the code or overriding it?
    I'm just not sure what that would be.

    November 23, 2014 at 10:53 pm #132633
    Josephine
    Participant

    Hi, I see it works now on your website! Can you tell me how you achieved this? I woul really like to show the blog page title but still did not succeed...

    Josephine

    November 23, 2014 at 11:00 pm #132636
    meghanwagner
    Member

    Hey Josephine,

    This is how i got the title to show:

    //Add Blog Title
    add_action( 'get_header', 'add_blog_title');
    function add_blog_title() {
    if (is_home() ) {
    add_filter( 'genesis_before_content_sidebar_wrap', 'blog_title' );
    function blog_title() {
    echo '<h1 class="entry-title">' . get_the_title() . '</h1>';
    }

    }
    }

    November 23, 2014 at 11:02 pm #132637
    Josephine
    Participant

    Wauw what a quick reply 😉 Did you place this in functions.php?

    November 23, 2014 at 11:03 pm #132638
    meghanwagner
    Member

    Yes in the functions.php file.

    November 23, 2014 at 11:05 pm #132639
    Josephine
    Participant

    I thought so but when I do that I get this:

    Parse error: syntax error, unexpected 'class' (T_CLASS), expecting ',' or ';' in C:\domains\vanstadtotwadwebdesign.nl\wwwroot\wp-content\themes\centric-pro\functions.php on line 212

    November 23, 2014 at 11:06 pm #132640
    meghanwagner
    Member

    It may not be the best solution but try removing ’ . get_the_title() . ‘ and just entering the title you want to show, it's not dynamic but that may be the problem.

    November 23, 2014 at 11:10 pm #132641
    Josephine
    Participant

    Stil does not work here...

    November 23, 2014 at 11:16 pm #132642
    meghanwagner
    Member

    Hmm I'm not sure what to tell you. I'd double check that a semi-colon didn't get dropped.

    November 23, 2014 at 11:22 pm #132643
    Josephine
    Participant

    Just one question: did i have to adjust somthing in the page_blog.php also?

    November 23, 2014 at 11:27 pm #132644
    meghanwagner
    Member

    Nope you shouldn't. What is your site URL?

    November 24, 2014 at 12:31 am #132646
    Josephine
    Participant

    I can give you that but it would not be of any use, it is under construction.

    November 24, 2014 at 12:37 am #132647
    meghanwagner
    Member

    No problem, thought I could be able to help troubleshoot. Sorry I couldn't be any more help. Good luck!

    November 24, 2014 at 1:00 am #132650
    Josephine
    Participant

    Thanks for your help so far!!

  • Author
    Posts
Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble