-
AuthorPosts
-
August 14, 2020 at 5:49 pm #1237900
I’d like to use the Reading Time WP (https://en-gb.wordpress.org/plugins/reading-time-wp/) to display the reading times for blog posts. The plugin defaults to show the times on blog posts just fine, but I am struggling to get it to show when the blog posts widget is set to “excerpt and read-more link”. It needs a little coding… Ideally, I would like it to show either 1. near the date, 2. under the title, or 3. near the read more link.
I have experimented a little with a function, but I can’t find the right hook to make it appear – can you help direct me to the right hook?
August 19, 2020 at 10:32 pm #1239318Hey,
Sorry for the late reply!
Could you please check the password once again? It does not work for me.
Best regards,
YigitAugust 20, 2020 at 12:53 pm #1239526Sorry about that – it should work now (the site was was in the middle of an SSL move).
August 26, 2020 at 1:19 pm #1240909Hi,
The plugin offers a shortcode that we can maybe use in the template to render the reading time
[rt_reading_time label=”Reading Time:” postfix=”minutes”]
If you’re using the Grid Layout, you have to modify the enfold\config-templatebuilder\avia-shortcodes\postslider\postslider.php and add the shortcode around line 733 or near this code which renders the post categories.
if( ! empty( $cats ) ) { $meta_out .= '<span class="blog-categories minor-meta">'; $meta_out .= $cats; $meta_out .= '</span>'; }
Best regards,
IsmaelAugust 28, 2020 at 3:19 pm #1241604Great – thanks! I changed this to:
if( ! empty( $cats ) ) { $meta_out .= '<span class="blog-categories minor-meta">'; $meta_out .= $cats; $meta_out .= '</span>'; $meta_out .= do_shortcode('[rt_reading_time label="Reading Time:" postfix="minutes"]'); //add reading time }
Am I right that I have to make this change to the core enfold version of postslider.php, and there’s no way to do this under a child theme? I.e. so that a future version of Enfold doesn’t overwrite the change.
–Edit:
Actually, the placement works fine, however, it looks like the plugin only is basing the reading time from the excerpt only. It works in the non-grid blog layout (I guess because I can use the “Full Content” option – which is not available in the grid view).
- This reply was modified 4 years, 2 months ago by dngood. Reason: updated, with extra information - reading time only using excerpt text
September 1, 2020 at 1:25 pm #1242504Hi,
Thank you for the update.
Unfortunately, we are not exactly sure how the plugin counts or calculates the reading time but there’s an available filter called rtwp_filter_wordcount that you can maybe use to adjust the calculation or include the whole post content in the calculation instead of just the excerpt.
Please contact the plugin developers for more info about the said filter.
Best regards,
IsmaelSeptember 1, 2020 at 2:08 pm #1242514Ismael
Sorry to interrupt here, but I have a ticket open for more than 10 days and nobody answers me, it is the first time that something so unpleasant has happened with the kriesi support team, could you please review?Thanks!
September 3, 2020 at 4:48 am #1242974 -
AuthorPosts
- You must be logged in to reply to this topic.