Tagged: ,

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #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 ?

    thanks

    #1221454

    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,
    Nikko

    #1223091

    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 ?

    thanks

    #1223207

    Hi Luc,

    Yes, that should place it below the title.

    Best regards,
    Nikko

    #1223412

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

    #1223545

    Hi,

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

    Best regards,
    Jordan Shannon

    #1307886

    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

    #1307956

    Hi Luc,

    No need to wrap it inside php, just put:

    the_date();

    since it’s already inside the php tag.

    Best regards,
    Nikko

    #1307967

    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 ?

    #1307969

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

    #1308137

    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,
    Nikko

    #1308145

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

    #1308159

    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,
    Nikko

    #1308163

    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

    thanks

    #1308216

    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,
    Nikko

    #1308480

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

    #1308529

    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 4.7.6.3 (your current Enfold version) though it works with the latest version 4.8.3.
    Please review your site.

    Best regards,
    Nikko

    #1308532

    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 !

    Luc

    #1308716

    Hi Luc,

    You’re welcome :)
    The current version of your Enfold theme on your site is still 4.7.6.3 (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 4.7.6.3 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,
    Nikko

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