-
AuthorPosts
-
January 6, 2020 at 11:12 am #1170656
Hi there,
I have updated the landing page of my blog to include some short form blog posts. I’m using the Blog Post element and want just the title of the post displayed. This works perfectly, except that there’s no date displayed. Is there a way to edit this in? I’d consider this more or less essential on a blog.
Many thanks for looking into this.
January 7, 2020 at 1:41 am #1170874Hey MadRhino,
Thank you for the inquiry.
In a grid layout, the
titledate will only display when an excerpt is available but it can be altered by editing the enfold\config-templatebuilder\avia-shortcodes\postslider\postslider.php file. Look for this code around line 615:if( ( $show_meta && ! empty( $excerpt ) ) || in_array( $show_meta_data, array( 'always', 'on_empty_content' ) ) )
Above it, add this line:
$show_meta_data = 'always';
This will display the meta info of the post even when it has no excerpt.
Best regards,
IsmaelJanuary 7, 2020 at 8:15 pm #1171182Thanks for your quick response Ismael. Just to be sure we are talking about the same thing. The title of the blog post itself displays perfectly. Even the corresponding blog post categories are displayed as they should. What I’m missing s the date of the blog post. Please take a look at the page I linked to in my post above to see what I mean. Is your proposed edit of the postslider.php file going to take of that?
Many thanks for clarifying this for me.
January 9, 2020 at 5:13 am #1171687Hi,
In a grid layout, the title date will only display when an excerpt i
Sorry about that. I meant the date or the post meta info will only display when there’s an excerpt. The modification above should change that behavior — allowing the post meta info to display even without the excerpt.
Thank you for your patience.
Best regards,
IsmaelMarch 11, 2020 at 6:18 pm #1192389I’m sorry Ismael, but this won’t work for me either.
I looked high and low and wasn’t able to locate the line of code you mentioned.
Please take a look at the attached screenshot to see what lines 600 to 645 look like. Are you aware that my site is a multi-site install?
Many thanks
March 12, 2020 at 1:13 am #1192454Hi,
In the latest version 4.7.3, the code is located around line 811 of the postslider.php file.
if( ( $show_meta && ! empty( $excerpt ) ) || in_array( $show_meta_data, array( 'always', 'on_empty_content' ) ) )
Please check it again.
Thank you for your patience.
Best regards,
IsmaelMarch 12, 2020 at 9:55 am #1192524Many thanks, Ismael. Found it and inserted the snippet as per your suggestion in line 810. Worked.
Just one more thing, Ismael, is this going to be overwritten again with the next theme update? Again, I’m running my site as a multi-site with child theme.
Many thanks for your help with this. You guys rock!
March 12, 2020 at 2:28 pm #1192625Hi,
As long as you are on a child theme your changes are update-proof.
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.