Change the title of the blog post

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1188
    Livemeshlivemesh
    Keymaster

    Unlike other elements in the site like pages or custom post types like portfolio, currently title of a blog post shows up below the top header while leaving the top header to populate a tagline modifiable through the theme options. The default title is “Blog”. If you need to modify this, pls make the following change to the code –

    Look for function mo_populate_tagline() in the file framework/functions/utility-functions.php in theme folder, look for the line

    } elseif (is_singular('post')) {
            echo '

    ' . $tagline . '

    ';

    and remove it or make it –

    } elseif (is_singular('post')) {
            echo mo_get_entry_title();
    

    Then remove the below line from the file single.php in theme folder (line number 88 ) –

    
    

    Pls note that the current way of handling the blog post title enables us to conform to http://microformats.org/wiki/hatom microformat. Not sure it matters anymore due to declining popularity of rss feeds.

    #1196
    Redlilydreamredlilydream
    Member

    Thank you. This is very good info!

    I’d like to know how to make the blog title the same throughout, though. My blog heading looks like this:

    My Blog Name
    My Blog Description

    Example

    Which is great. But when you click on an individual blog post, the heading looks like this:

    My Blog Name

    Example

    How can I make ‘My Blog Description‘ in paragraph form to show under ‘My Blog Name‘ in individual posts?

    This is what’s in utility-functions.php:

    function mo_populate_tagline() {
    
        /* Default tagline for blog */
        $tagline = mo_get_theme_option('mo_blog_tagline', __('My Blog Name', 'mo_theme'));
    
        $default_homepage_title = get_bloginfo('name') . __(' Home', 'mo_theme');
        $homepage_tagline = mo_get_theme_option('mo_homepage_tagline', $default_homepage_title);

    Thanks again for pointing me in the right direction!

    #1204
    Livemeshlivemesh
    Keymaster

    You can change the function to something like below to obtain the result you desire –

    function mo_populate_tagline() {
    
        if (is_singular('post')) {
    
            echo '
    '; echo '

    The Cure

    '; echo '

    An eCommerce blog from the creators of Design Flu™

    '; echo '
    '; return; } /* Default tagline for blog */ $tagline = mo_get_theme_option('mo_blog_tagline', __('Blog', 'mo_theme')); $default_homepage_title = get_bloginfo('name') . __(' Home', 'mo_theme'); ...... .......

    I utilized the code you used for the blog page to populate the title for individual posts. Hope that helps.

    #1209
    Redlilydreamredlilydream
    Member

    Perfect! Thank you! I really suck at php. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.