WordPress.org

Ready to get started?Download WordPress

Forums

Different HTML on first page of category roll? (3 posts)

  1. XLCowBoy
    Member
    Posted 3 years ago #

    Hey everyone,

    Was wondering if there was a way to do an if else based on the page number of a category? The idea is to have an introduction text for the category on the 1st page (e.g. Category A is about X topics, including G,H, and I sub-topics), and on the succeeding pages, the introduction text is replaced by the category title.

    Help?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

  3. Avnish Awasthi
    Member
    Posted 3 years ago #

    Use this code
    query_posts('page_id=1');
    if (have_posts()) : while (have_posts()) : the_post();
    //code run when page id is equal to 1
    endwhile; endif;

Topic Closed

This topic has been closed to new replies.

About this Topic