Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What do you mean by “Reference category ID”?

    Thread Starter samtemehr

    (@samtemehr)

    I want in category.php return cat ID for current code.

    <?php $cat=THIS CATEGORY; ?>
     <?php query_posts("cat=$cat&showposts=1"); ?>
     <?php while (have_posts()) : the_post(); ?>
    • This reply was modified 5 years, 11 months ago by samtemehr.
    • This reply was modified 5 years, 11 months ago by samtemehr.
    Thread Starter samtemehr

    (@samtemehr)

    not loaded category posts?

    <?php
        $category_id = get_cat_ID( 'Category Name' );
        $category_link = get_category_link( $category_id );
    ?>
    <?php query_posts("cat=$category_id&showposts=1"); ?>
    
    
    • This reply was modified 5 years, 11 months ago by samtemehr.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How Reference category ID in the same category’ is closed to new replies.