Tagged: blog posts, date
-
AuthorPosts
-
November 24, 2020 at 6:29 am #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!
November 26, 2020 at 4:07 pm #1263284Hey,
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 lineecho "<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,
YigitDecember 1, 2020 at 10:08 am #1264162Thanks 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!
December 1, 2020 at 10:16 am #1264164Hi,
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,
YigitDecember 1, 2020 at 10:44 am #1264171Hey,
Thanks for the quick reply. I cleared the cache but that didn’t work.
Will attach the info.
Thank you
December 1, 2020 at 10:49 am #1264172Hi,
I moved the file inside “includes” folder and that helped.
Please review your website :)
Best regards,
YigitDecember 1, 2020 at 11:00 am #1264178Looks 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!
December 1, 2020 at 11:21 am #1264185Hi,
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,
YigitDecember 1, 2020 at 11:42 am #1264191That did it!
Perfect.
Again, really appreciate your help!
December 1, 2020 at 11:56 am #1264198Hi,
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 -
AuthorPosts
- The topic ‘Adding date to Blog Posts Element’ is closed to new replies.