Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #505807

    I have set up my main blog page to display just one category, called “Blog” as I use some other categories for specialty purposes.
    The page works fine, displaying just that category: http://dev.solacesystems.com/blog/

    Problem is when you go to individual blog posts. The title at the very top of the page “Blog – Latest News” (how can I customize that text, by the way) is a hyperlink that takes people to the site’s home page, which isn’t logical or right, rather than to the main blog page.

    The solution to THAT problem is to go in to the Enfold Settings and change “And where do you want to display the Blog?” to that page.
    But then the filtration doesn’t work anymore, it then displays ALL blog posts regardless of category.

    How do I set my customized/filtered blog page to recognized by Enfold as the location of my blog?

    #505967
    #506237

    Thanks for responding. Sorry but the instructions are pretty vague, and I need a little more guidance. Can’t risk screwing up my site playing around doing something that’s over my head.

    It just says “use the following function.” Does that mean I add it to functions.php in my child theme?
    And to set the title and URL to what I want, do I replace get_the_title($id) and get_permalink($id) with the actual title and URL I want like this?

    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’] = Blog;
    $args[‘link’] = /blog;
    $args[‘heading’] = ‘h1’;
    }

    return $args;
    }

    #506441

    Hey!

    Yes, you can simply add the code to Functions.php file of your child theme. If you use the code as is, it will show single post title and get its link. If you would like to adjust those, yes, you are going to need to change get_the_title($id) and get_permalink($id). if you elaborate on the changes you would like to make, we can gladly help you :)

    Cheers!
    Yigit

    #506747

    I just want the text of the page title to be “Blog” instead of “Blog – Latest News” and
    I want it to be a link to http://dev.solacesystems.com/blog instead of http://dev.solacesystems.com
    Appreciate your assistance, thanks much.

    #506983

    Hey!

    Please use the code as following

    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'] = "Blog";
            $args['link'] = "http://dev.solacesystems.com/blog";
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    Best regards,
    Yigit

    #507443

    That worked like a charm, thanks so much for your help.

    #507540

    Hi,

    Great, glad we could help :-)

    Thanks,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Setting Blog to be a Customized Page’ is closed to new replies.