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

    With an older website, I moved to the Enfold theme. So all blog items are build outside the Avia layout builder. For all these blog items, the title bar shows “Blog – latest news” instead of the blog title.
    When I open the blog in the backend, hit the blue “Advanced layout builder” button and save the post, the blogtitle is shown in the green title bar (for links see the private content).
    Is there a way to ‘update’ all blogs on an automatic way?

    Sytse

    #947625

    Hey sberendss,

    Thank you for using Enfold.

    Use this filter in the functions.php file to change the single post title.

    add_filter('avf_title_args', 'avf_title_args_mod', 10, 2);
    function avf_title_args_mod($args,$id)
    {
         if ( is_singular('post') ) {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
         }
        return $args;
    }

    Best regards,
    Ismael

    #948207

    Hi Ismael, thaks for the help. But I’m afraid there is a typo in the code.
    When I add the code via the WP editor, I receive the message “syntax error, unexpected ‘function’ (T_FUNCTION)”, regarding line “function avf_title_args_mod($args,$id)”
    When I add the code anyway via FTP, the frontend of the website returns an 500 error.
    Can you review the code?

    Thanks again,

    Sytse

    #948594

    Hi Sytse,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #949071

    Victoria, yes ofcourse. Here they are

    #950101

    Hi,

    Thanks for the update. We can’t access the site though. Please contact your hosting provider.

    Your access to this site has been limited

    Did you copy the code from your email? Please copy it directly from the forum. Check if there is an existing function with the same title.

    Best regards,
    Ismael

    #950584

    Ismael and Victoria, thanks. It’s solved.
    I copied the code from e-mail indeed. Now i copied it from the forum and it does exactly what was wished.

    Thanks again! Case closed.

    Sytse

    #951349

    Hi Sytse,

    Great, glad you got it working. I’ll close this thread for now, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

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