Help needed with php navigation
-
Help!
I have worked on my pagination and now my single post pagination is off. Please see it here:
http://www.minademas.com/2008/01/02/introduciendo-al-mundo-womee/As you can see, I can now see 2 styles of pagination, the article ones and below that the new navigation by pages.
My code on navigation.php is:
<?php if (is_single()) : ?>
<div class=”navigation”>
<span class=”previous”><?php previous_post_link(‘← %link’) ?></span>
<span class=”next”><?php next_post_link(‘%link →’) ?></span>
</div>
<div class=”clear whitespace”></div>
<?php endif; ?>
<?php if(class_exists(‘wp_pagination_plugin’)){
$p = new wp_pagination_plugin;
$p->show();
$p->nextLabel(”); // removing text ‘next’
$p->prevLabel(”); // removing text ‘previous’
$p->nextIcon(‘►’); // changing the icon ‘next’
$p->prevIcon(‘◄’); // changing the previous ‘icon’
}——-
How can I fix it so on the Single post I can only see the article navigation and NOT the pagination style? I know it has something to do with the php if, but I dont know how to put it correctly. Tks!
-
Any idea guys? please!
“How can I fix it so on the Single post I can only see the article navigation and NOT the pagination style?“
http://codex.ww.wp.xz.cn/Conditional_Tags#A_Single_Post_Page
Use the conditional linked above to do something like:
<?php if( is_single() ) : ?> ~ displays on single post pages only ~ <?php endif; ?>Or alternatively:
<?php if( !is_single() ) : ?> ~ displays anywhere but on single post pages ~ <?php endif; ?>(PHP info: ! = NOT in this situation)
The topic ‘Help needed with php navigation’ is closed to new replies.