• Hello dear Jason Yingling!
    I’m so happy for using your plugin but since I installed this plugin there is a “reading time” section in my home page. Also in the setting I couldn’t fine any section for this and I also searched in the forum and didn’t find any question related to mine.
    So would you please give me some guide?

    • This topic was modified 4 years, 1 month ago by gameo7er.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jason Yingling

    (@yingling017)

    Do you have a link to view your page? Also what settings are you using for displaying your Reading Time?

    Thread Starter gameo7er

    (@gameo7er)

    Thank you for your replying. Here is my website:

    https://unrivaled.ir/
    as you can see in the top of slider we can see your plugin.
    I checked show in “posts” and “pages” in settings.

    Maybe it’s better you consider a section into the setting for excluding home page.
    Thank you so much

    Plugin Author Jason Yingling

    (@yingling017)

    Do you actually want to display the reading time on your Pages within WordPress?

    If you don’t want it on every “Page” you could disable that setting and pull it into specific pages using the shortcode.

    Thread Starter gameo7er

    (@gameo7er)

    For example I have 12 pages. I need to enable “Reading Time” for them because they need to be read and the purpose of this plugin is “showing reading time” as I understood. isn’t it?

    So it’s really hard to disable it for all pages and include shortcode in 12 pages. Instead I can just “Exclude home page”. That’s why I opened this topic.

    So would you please to consider this topic as a “Feature Request” and add it to next version?

    Thanks in advance

    Plugin Author Jason Yingling

    (@yingling017)

    Sure, in the meantime you could rework this sample bit of code to remove it from the front page. https://gist.github.com/jasonyingling/ad2832bc1768d1fbb63341aef072908b

    
    function reading_time_remove_front_page() {
    	if ( is_front_page() ) {
    		global $readingTimeWP;
    		remove_filter('the_content', array($readingTimeWP, 'rt_add_reading_time_before_content'));
    	}
    }
    
    add_action( 'wp', 'reading_time_remove_front_page' );
    

    is_front_page will return true if your on your site’s static front page. If your using the blog archive you’ll want to check is_home. More info on those can be on the codex. https://developer.www.ads-software.com/reference/functions/is_front_page/

    This will need to go in your theme’s functions.php

    HI Jason, there’s a way to exclude the plugin for a specify post category ? Thank you very much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to exclude home page – Reading Time WP’ is closed to new replies.