Skip to content
Public Ticket #25087

Article Read Time counting images and embed characters

Conversation thread

PenciDesign Supporter replied

Staff Reply

Hi,

Yes. We'll update this ticket when the new update includes this feature.

Regards,
PenciDesign.


JamesWillcocksWeb replied

Customer Reply

Is this something that you still plan on releasing?

PenciDesign Supporter replied

Staff Reply

Hi,

The code you've added will ignore the Instagram to the reading calculation function. 

There is no option to customize it without modifying the theme template. We'll add this as an option in the future theme update.

Regards,
PenciDesign.


JamesWillcocksWeb replied

Customer Reply

I've solved the issue. Here's my solution:

Insert code within this file:
\\public_html\\wp-content\\themes\\soledad\\inc\\template-function.php

add this code:

//Instagram block quote REGEX
$pattern ='/<blockquote class="instagram-media"(.*?)<\\/blockquote>/is';

// Remove matching text using preg_replace()
$text = preg_replace($pattern, '', $text);

within the function function penci_estimate_readingtime( $id ) after the $text variable has been defined

Do you have a way of doing this without editing parent theme files? I'm new to custom stuff like this.

PenciDesign Supporter replied

Staff Reply

Hi,

For this case, please send me your WordPress admin account.
I'll log in and try to help you check it.

Regards,
PenciDesign.



JamesWillcocksWeb replied

Customer Reply

I've done that however because some articles will have lots of embedded links and some will have none you still get very inaccurate read times.

For example, if an article only has text that takes maybe 3 minutes to read it will only say it takes 1 minute. And an article with little text but a lot of images and embeds will say 15 minutes. Is there, not a better solution for it to ignore embeds?

PenciDesign Supporter replied

Staff Reply

Hi,

Please go to Appearance → Customize → General → General Settings → Reading Time: Words Per Minute: modify the value on this option.

Regards,
PenciDesign.


JamesWillcocksWeb started the conversation

Conversation Start

I've noticed articles with a lot of pictures and embedded items have really long read times, is there a way to adjust how read times are calculated to ignore these and just look at the actual content.

Want to join this conversation or access attachments? Sign in first.