-
AuthorPosts
-
July 2, 2015 at 7:31 am #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 10 years, 4 months ago by
Elliott.
July 2, 2015 at 3:51 pm #467602Hi 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,
ElliottJuly 3, 2015 at 11:10 am #467908Hi 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(' | 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
July 6, 2015 at 10:48 am #468781Hey!
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(' | 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,
IsmaelJuly 10, 2015 at 10:48 am #471379Oooh :)
Great thanks ismael !Merci beaucoup !
-
AuthorPosts
- The topic ‘Add Time and date below the title on a page’ is closed to new replies.
