WordPress.org

Ready to get started?Download WordPress

Forums

is_home(), is_single() problem (1 post)

  1. ProHerb
    Member
    Posted 4 years ago #

    Hi,

    I try to develop plugin, so is_home() and is_front_page() even is_single() are not working for me.
    Many posts about this problem, it seem like "wp_reset_query();" placed before condition tag should be worked, but not me T-T.

    'wp_reset_query()' may work on wp theme develop NOT wp plugin.

    Here is my code

    wp_reset_query();
    if(is_single()){
          echo "my result's here";
    }

    I put this code in my plugin and need it displays only single posts.
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags