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

  1. XLCowBoy
    Posted 5 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.


  2. Michael
    Forum Moderator
    Posted 5 years ago #

  3. Avnish Awasthi
    Posted 5 years ago #

    Use this code
    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