I'm trying to puzzle out I'm able to only execute my wordpress plugin around the single publish page as opposed to the primary index page. It's disregarding the tag that we thought would resolve this problem.

Presently, this is the way it's working:

add_action('the_content', 'my_plugin');

I attempted discovering the however it would return false in history. I figured it might be removed around the single publish pages:

if (strpos($post_content, '<!--more-->')) {  
            return false;
    }

There's most likely a much better hook with this however i am certainly a new.

Do that immediately after the_post();

Global $more;

or before you call the_content

Incidentally, the easiest method to make certain that something isn't went around the home page is as simple as check if it's the house page. Do this:


if(!is_home())

Wordpress plugin