Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #3397456
Article Read Time counting images and embed characters
Closed

Comments

  • JamesWillcocksWeb started the conversation

    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.

  •  2,277
    PenciDesign replied

    Hi,

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

    Regards,
    PenciDesign.


  • JamesWillcocksWeb replied

    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?

  •  2,277
    PenciDesign replied

    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

    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.


  •  2,277
    PenciDesign replied

    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

    Is this something that you still plan on releasing?

  •  2,277
    PenciDesign replied

    Hi,

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

    Regards,
    PenciDesign.