Tagged: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1150913
    #1151222

    Hi,

    I solved one of my two questions. For the magazine presentation, to add “Published on” before the date, I went into /enfold/config-templatebuilder/avia-shortcodes/magazine/magazine.php and replaced the following line:

    $output .= "<time class='av-magazine-time updated' {$markupTime}>".$time."</time>";

    with

    $output .= "<time class='av-magazine-time updated' {$markupTime}>".__('Posted on ','avia_framework')."".$time."</time>";

    And to do it in the child’s theme instead, I followed theses instructions:

    I’m still searching for how to do this on single posts, in addition to moving the date at the top of the content on posts.

    Thanks!

    • This reply was modified 5 years, 1 month ago by darryllevine.
    #1151237

    I finally found how to move the date to the top of the posts. See: https://kriesi.at/support/topic/move-date-in-post-to-top/

    But I’m still not sure how to add “Posted on” before the date in the post.
    Any ideas? Thanks!

    #1151663

    Hi,

    We’re glad to hear that.
    Go to wp-content > themes > enfold > includes > loop-index.php (line 305):

    echo "<time class='date-container minor-meta updated' >".get_the_time(get_option('date_format'))."</time>";

    Insert it text there.

    Best regards,
    Nikko

    #1151833

    Hello,

    Thank you! Can you tell me exactly where I need to put it (and in a way for the text to be translatable)? Because I tried to add it in that line of code, but it breaks the site, so there’s something I’m not doing right.

    Is it also possible to put it in the child’s theme? Or must I change that file after each update?

    Also, regarding moving the date to the top of the post, is there any other way than the one explained here (https://kriesi.at/support/topic/move-date-in-post-to-top/)? I’m asking because on most posts we do not use the builder and when that is the case, the date is not positioned correctly, if overlaps other content.

    Thank you.

    #1152052

    Hi darryllevine,

    In your child theme, create a folder and name it includes then inside it create a file called loop-index.php (this will override loop-index.php in the enfold theme).
    Then paste this code: https://pastebin.com/HFcbR3um
    It’s basically derived from loop-index.php then replaced line 305 I mentioned in the previous post then move it to the top.
    Hope this helps.

    Best regards,
    Nikko

    #1152094

    Perfect, thank you very much Nikko. I still sometimes have a problem when not using the builder, but I add a spacer and it corrects the problem.
    Thanks!

    #1152135

    I just noticed that this code seems to be preventing the featured image from appearing at the top of the article.

    #1152224

    Hi darryllevine,

    Thanks for pointing it out, it can be fixed by adding this css code in Quick CSS:

    #top #main .post-entry .post-meta-infos {
        float: none;
    }

    Best regards,
    Nikko

    #1152385

    Thank you! It also corrected the overlapping/spacer problem.

    #1152390

    Hi darryllevine,

    We’re glad to hear that :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Moving post date and adding text in front ("Published on")’ is closed to new replies.