Title: Problem with the  function
Last modified: August 20, 2016

---

# Problem with the function

 *  [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * (@seomegacorp)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/)
 * Hi all,
 * I’m facing problem with the <?php is_paged(); ?> function. Please help me to 
   understand the problem and fix it.
 * Here’s my code:`<?php get_header(); ?>
 *  <?php if(!is_paged()) { ?>
 *  <div id=”top” class=”clearfloat”>
 *  <div id=”headline2″>
 *  <?php $col = 0; $numcols = 3; ?>
 *  <?php while (have_posts()) : the_post(); ?>
    <?php if ($ct && $ct%$numcols==
   0) echo ‘<div class=”clearcol”></div>’; ?> <div class=”col”>
 *  <div class=”clearfloat”>
    <div class=”spoiler”> <?php $values = get_post_custom_values(“
   Image”); if (isset($values[0])) { ?> <a href=”<?php the_permalink() ?>” rel=”
   bookmark” title=”Permanent Link to <?php the_title(); ?>”> <img src=”<?php echo
   bloginfo(‘template_url’); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values(“
   Image”); echo $values[0]; ?>&w=270&h=250&zc=1&q=100″ alt=”<?php the_title(); ?
   >” class=”left” width=”270px” height=”170px” /></a> <?php } ?>
 *  <h2 class=cat_title><?php the_category(‘, ‘); ?> &raquo</h2>
    <div class=”title”
   ><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></
   div> <div class=”meta”>[<?php the_time(‘j M Y’) ?> | <?php comments_popup_link(‘
   No Comment’, ‘One Comment’, ‘% Comments’);?> | <?php if(function_exists(‘the_views’)){
   the_views(); } ?>]</div>
 *  <?php echo excerpt(30); ?>
    </div>
 *  </div>
    </div> <?php $ct++; ?> <?php endwhile; ?>
 * <?php wp_reset_postdata();?>
    <div class=”clearcol”></div>
 * <?php } ?>
 *  <div class=”navigation”>
 *  <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); }
 *  else { ?>
 *  <div class=”right”><?php next_posts_link(‘Next Page »’) ?></div>
 *  <div class=”left”><?php previous_posts_link(‘« Previous Page’) ?></div>
 *  <?php } ?>
 *  </div>
 *  </div>
    </div> </div>
 * <?php get_footer(); ?>`
 * Thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Jackson Whelan](https://wordpress.org/support/users/madjax/)
 * (@madjax)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2268936)
 * Nobody can help you fix your problem unless you;
    1. Describe your problem. Simply stating that you have one is not enough
    2. Use [http://wordpress.pastebin.com](http://wordpress.pastebin.com) to post your
       code
 *  Thread Starter [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * (@seomegacorp)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2268942)
 * Sorry for not having elaborated the problem.
 * So, let me start once again. I’ve been customizing a theme to suit my needs. 
   Now, I wish to show one of the category to be different which it does quite beautifully.
   But the problem arises when I use the page navigation. The first page opens well
   but when I click on the page 2 it doesn’t show the posts. To what I understand
   up till now is, the paged function is not customized well here, which is making
   the problem to occur. If somebody can check the code and let me know where the
   problem is then perhaps I can fix it.
 * Let me know if that went well. Thanks.
 *  Thread Starter [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * (@seomegacorp)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2269160)
 * Anybody here who can help me or tell me how I can get some help?
 *  Thread Starter [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * (@seomegacorp)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2269161)
 * Here’s the pastebin link .. [http://pastebin.com/CUdPsBiJ](http://pastebin.com/CUdPsBiJ)
 *  [Jackson Whelan](https://wordpress.org/support/users/madjax/)
 * (@madjax)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2269162)
 * Try removing lines 3 & 40
 * Your loop is set to display only on the first page
 * PS – This reply made possible by pastebin…
 *  Thread Starter [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * (@seomegacorp)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2269163)
 * Sweet, got it. Thanks Jackson. I was trying to call the if then statement as 
   the wordpress mentions. I’ll use pastebin for the future queries. A new lesson
   learned. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problem with the function’ is closed to new replies.

## Tags

 * [is_paged](https://wordpress.org/support/topic-tag/is_paged/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Manish Pandey](https://wordpress.org/support/users/seomegacorp/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/problem-with-the-function/#post-2269163)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
