Forums

What are the redirect paramemters? (6 posts)

  1. jermartin77
    Member
    Posted 2 years ago #

    Hello,
    I am looking at modifying my archive page to display content if the user is in a specific category.

    so I would like to do something like:

    if($_GET['cat'] == 'foo'){
    echo 'content specific to this category';
    }

    I just cannot find the name of the parameter for category.

  2. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    Try:

    <?php if(is_category'foo')) :?>
    [ specific content ]
    <?php else :?>
    [ general content ]
    <?php endif;?>
  3. jermartin77
    Member
    Posted 2 years ago #

    where "foo" would be the category id or slug?

  4. jermartin77
    Member
    Posted 2 years ago #

    Thanks that is much better than going after the actual parameter

  5. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    Sorry. "foo" can be a category title, slug or id (if I remember correctly.)

  6. mercuryfenix
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic