• Resolved dyakub

    (@dyakub)


    I’m using wordpress version 2.86 and I’m having problems with the “is_category” in php. What I’m trying to do is redirect a user to a page if the user clicks on a category. This is the code I tried:

    <?php
     if (is_category('twitter')) {
     get_page($twitter-updates);
     }
    ?>

    If this code is correct, then it says if the category “twitter” is displayed, then get/display the page “twitter updates”. When a user clicks on the category “twitter”, instead of displaying the posts in the category the browser will display the page “twitter updates”.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_category not working’ is closed to new replies.