WordPress.org

Support

Support » How-To and Troubleshooting » if (!in_category('1')) wont work

if (!in_category('1')) wont work

  • Waqas

    @muhammadwaqas

    I want to add a piece of javascript, other than category 1 archive and posts. the following methods works, but it wont show code on other pages. such as homepage or posts from other categories

    <?php if (!in_category('1')) {?>
    my design here
    <?php } ?>
  • The topic ‘if (!in_category('1')) wont work’ is closed to new replies.
Skip to toolbar