Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #221878

    Following the instrux on http://kriesi.at/documentation/enfold/replace-the-default-blog-latest-news-title/,
    I pasted the code below at the end of he functions.php file, but nothing changed. It still reads “Blog – Latest News”. What should I do now?

    /*
     * KBS change blog title 
     */
     
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( $args['title'] == 'Annies News and Views' )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
        }
    
        return $args;
    }
    #221888

    Also need help adding an apostrophe. Above I wroteif ( $args['title'] == 'Annies News and Views' ), but of course Annies should be Annie’s. How do I do that? Annie\'s ?
    Thanks

    #222111

    Hey!

    Please try following code

    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ($args['title'] == 'Blog – Latest News')
        {
            $args['title'] = "Annie's News and Views";
            $args['link'] = get_permalink($id);
       }
        return $args;
    }
    

    Best regards,
    Peter

    #222359

    I added that at the end of the functions.php file, but the Blog – Latest News didn’t change.
    Not always sure I get my php correct. Here is a screen grab of what I did:

    [IMG]http://i61.tinypic.com/2vns3kn.jpg[/IMG]

    What next?

    #222376

    Whoa! I see what could be the issue. I had not used the Enfold Theme Options to select where I want to display the Blog. I had done that in the WP > Reading settings. Selecting through the Enfold Theme Options page makes it work. My bad.
    Now I am going to try to change the blog layout.
    http://kriesi.at/documentation/enfold/have-a-different-single-page-blog-layout/

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Replace the default “Blog – Latest News” title’ is closed to new replies.