Forums

What are the redirect paramemters? (6 posts)

  1. jermartin77
    Member
    Posted 4 months 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
    Member
    Posted 4 months ago #

    Try:

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

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

  4. jermartin77
    Member
    Posted 4 months ago #

    Thanks that is much better than going after the actual parameter

  5. esmi
    Member
    Posted 4 months ago #

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

  6. mercuryfenix
    Member
    Posted 4 months ago #

Reply

You must log in to post.

About this Topic