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

    Hi everybody
    I know it’s not common, but I need to display the date and time below the title on the custom-post-type I’ve created for my site

    • Is it possible ? Where Should I add a piece of code to do so ?
    • Is it possible to rewrite a function avia_title (in functions-enfold.php Line316) in a child theme to do so just for the PORTFOLIO page or CPT page ?

    Many thanks to you powerful support team

    • This topic was modified 9 years, 5 months ago by Elliott.
    #467602

    Hi Ikyo!

    Even if it’s a custom post type that information should be displayed by default. Are you using the advanced layout builder? If so then switch back to the default editor. The layout builder is for users who need complete control over how their post displays.

    Best regards,
    Elliott

    #467908

    Hi Elliott
    Thanks one more time for your help
    In fact I NEED to add those additionals data (date, tag…)whenever i’m working with advanced editor or not :)
    I made it by myself by using the field ‘additions’ in line 333 of functions-enfold.php
    'additions' => "<div class='temps'><ul><li>".get_the_time(get_option('date_format'))."</li><li>". get_the_tag_list('&nbsp;| Mots clefs: ',', ')."</li></ul></div>",
    And it works :)

    Nethertheless, I’m asking a question : is there a way to undeclare / redeclare the function function avia_title is the child theme (better for updates :) (will be also cleaner)

    Many thanks for your powerful theme

    #468781

    Hey!

    You can try this in the functions.php file:

    
    add_filter('avf_title_args', 'avf_title_args_mod', 10, 2); // edit default title
    function avf_title_args_mod($args,$id)
    {
    	$args['additions'] = "<div class='temps'><ul><li>".get_the_time(get_option('date_format'))."</li><li>". get_the_tag_list('&nbsp;| Mots clefs: ',', ')."</li></ul></div>";
    	$args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>";
        return $args;   
    }

    Regards,
    Ismael

    #471379

    Oooh :)
    Great thanks ismael !

    Merci beaucoup !

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add Time and date below the title on a page’ is closed to new replies.