Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #661165

    Hi,

    I successfully implemented this change for my single blog post page: http://kriesi.at/documentation/enfold/replace-the-default-blog-latest-news-title/

    Now i’d like to add the post posted date beside the title, what should the code look like?

    #662339

    Hey kilimats,

    Thank you for using Enfold.

    Please replace the code with the following:

    
    // 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) . "<time class='date-container minor-meta updated' >".get_the_time(get_option('date_format'), $id)."</time>";
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }
    

    Best regards,
    Ismael

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