Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1262584

    Is it possible to add a date to a blog posts element?

    I’m using the “List Layout – Compact (Title and icon only)” setting which is working perfectly.

    Because I’m using this element to take blog posts headlines from our “news” category, I’d like to display the date as well.

    Any help on how to accomplish this would be greatly appreciated!

    Thank you!

    #1263284

    Hey,

    Thanks for contacting us!

    – Please go to /enfold/includes/loop-index.php file and copy it to your child theme
    – Open the file on your child theme and find following line

    
    echo "<span class=' fallback-post-type-icon' " . av_icon_string($format) . '></span>';
    

    – Add following line right below it

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

    – Then add following code to Quick CSS field in Enfold theme options > General Styling

    .bloglist-compact .date-container {
        float: right;
    }

    It should look like this – https://imgur.com/a/YmIBgt4 :)

    Best regards,
    Yigit

    #1264162

    Thanks so much for the help, but it didn’t seem to work.

    I’m just supposed to copy the edited “loop-index.php” file to the Enfold child theme folder right?

    I also added the lines of code to the Enfold child theme general style CSS, but no dice…

    Would appreciate your help.

    Thank you!

    #1264164

    Hi,

    Could you please clear cache and check if that helps?
    If it does not, please post FTP logins here privately so we can apply the changes for you :)

    Best regards,
    Yigit

    #1264171

    Hey,

    Thanks for the quick reply. I cleared the cache but that didn’t work.

    Will attach the info.

    Thank you

    #1264172

    Hi,

    I moved the file inside “includes” folder and that helped.

    Please review your website :)

    Best regards,
    Yigit

    #1264178

    Looks awesome! You’re a genius, thank you!

    I’m sorry for asking (because I know it’s not your job to do everyone’s website, but…)

    How can I:

    1. Change the date format to: YYYY/MM/DD

    2. Change the order to: Icon, Date, Headline (or even delete the icon)

    3. Make the date and the blog title heading the same

    Thank you so much again!

    #1264185

    Hi,

    You are welcome! :)

    1- Please go to Settings > General and change it under “Date Format”

    2- Please replace following code

    .bloglist-compact .date-container {
        float: right;
    }

    with following one

    .main_color .bloglist-compact .fallback-post-type-icon {
        display: none;
    }

    3- Please add following code to Quick CSS as well

    .bloglist-compact .date-container {
        color: black;
        font-size: 14px;
    }

    Best regards,
    Yigit

    #1264191

    That did it!

    Perfect.

    Again, really appreciate your help!

    #1264198

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/

    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Adding date to Blog Posts Element’ is closed to new replies.