WordPress.org

Ready to get started?Download WordPress

Forums

Sending a category to is_category via Theme Options (1 post)

  1. weborithm
    Member
    Posted 4 years ago #

    I have a custom built theme options panel that sets a selected category as "Featured" and displays it on the home page.

    So it looks like this, and this works -

    <?php $featured_query = new WP_Query('showposts='.$fnumber.'&cat='.$featured); ?>

    Now, I'm trying to pass the same value to the archive.php page which will let me show a custom archive page for the "Featured" category.

    So, I did this -

    <?php if (is_category('$featured') ) { ?>

    But it does not work.

    I even tried

    <?php if (is_category(.$featured.) ) { ?>

    and many other variations.

    Any help would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic