Tagged: ,

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
  • #1221230

    Hi, I’m using avia builder for all post and I would like to have the date post above the title.
    How can I have this ?



    Hi Luc,

    You will most likely need to modify single.php in your child theme.
    First, copy single.php from the parent theme (Enfold) and paste it inside the child theme.
    Above this code:

    if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));

    You’ll most likely need to use the_date() function to fetch the published date: https://developer.wordpress.org/reference/functions/the_date/
    Hope this helps.

    Best regards,


    Thanks Nikko, I understand, but I’m using the h1 title with fonction from header settings in back-office : Show title et breadcrumb.
    So, how to add the date between this and content ?
    is it here https://prnt.sc/t0stoz ?



    Hi Luc,

    Yes, that should place it below the title.

    Best regards,


    <?php the_date () ?> juste like that ?



    Yes that goes in the loop and will pull the post date.

    Best regards,
    Jordan Shannon


    HI, I come back to this post only now …
    I added the snippet of code as well https://prnt.sc/17fatmn, the date is not displayed.
    It’s not correct ?

    Thank you


    Hi Luc,

    No need to wrap it inside php, just put:


    since it’s already inside the php tag.

    Best regards,


    Hi Nikko,
    I’ve put this https://prnt.sc/17h2qwr
    nothing is displaying here (exemple) https://www.footbreizhacademie.com/interviews-parents/coaching-individualise-de-la-bretagne-a-lirlande-en-visioconference/

    I’have another problem in the post, the H1 is a link, do you have a solution ?


    It’s not necessary to put some code here : https://prnt.sc/17h4in5 ?


    Hi Luc,

    Please remove the modification you made then paste this code in your child theme’s functions.php file: https://pastebin.com/LM2Jxq83
    This should remove the link of the title on the single posts then adds the date below it.
    This is the code that I added to add the date:

    if( is_single() ) {
    	$heading_html .= '<span class="main-date">' . get_the_date() . '</span>';

    Hope this helps.

    Best regards,


    Hi Nikko, thanks, I copied and pasted all the code from the pastbin, but it breaks my posts (content disappears).
    Do you know why ?


    Hi Luc,

    Did it cause an error? have you pasted it at the bottom of functions.php?
    I have tested this code on my local server and I don’t see any issues.
    Can you give us a link where it causes issues?

    Best regards,


    Yes in the bottom of functions.php child

    Here an example link: https://www.footbreizhacademie.com/fil-info/un-gardien-au-sport-etudes/

    please check quickly, because all the post are down



    Hi Luc,

    I could still see your posts on my end.
    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( to be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,


    Hi Nikko, here the url to connect, thanks !!


    Hi Luc,

    Thanks for giving us admin access.
    I have updated your functions.php and re-added function avia_title
    The reason it’s removing your post before was the code I gave wasn’t compatible with Enfold (your current Enfold version) though it works with the latest version 4.8.3.
    Please review your site.

    Best regards,


    Ni nikko, Thanks !

    The current version enfold is 4.8.3, I don’t understand your feed back.
    It work now, cool ! thanks a lot !



    Hi Luc,

    You’re welcome :)
    The current version of your Enfold theme on your site is still (you can check it in the link in private content).
    This code should work in version 4.8.3: https://kriesi.at/support/topic/date-post-blog-with-avia-builder/#post-1308137 but with Enfold it shows an error and does not display the content, so I have tweaked the code to make it work.
    Anyway, we’re just glad that it’s working properly on your end now :)

    Best regards,

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