Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How can i disable wp-pagenavi on pages using templates and the wordpress loop? It seems that wp-pagenavi adds itself automatically wherever the wordpress loop is used, not counting that it is a page or not.

share|improve this question
    
You might want to try wordpress.stackexchange.com –  John Conde Jan 2 '11 at 1:37
    
Has your question been answered here or have you found an answer elsewhere? –  Christopher Feb 14 '11 at 19:26
    
@Christopher Found the solution later and forgot to come back to stack. Fixed now. :-) If you're interested in the solution check the comment to the accepted answer. –  Shinnok Feb 14 '11 at 20:40
    
Awesome! Thanks for your response. :) –  Christopher Feb 15 '11 at 11:12

1 Answer 1

up vote 0 down vote accepted

you probably have wp_pagenavi() in the footer.php file.

if you don't want it to appear in the page.php you can do this.

<?php if(!is_page()) { ?>

// if it is not a page echo the page navigation

<?php wp_pagenavi(); ?>

<?php } else { ?>

// if it is a page do nothing or you can specify.

<?php  } ?>

but i'm not quite sure of what you mean by page template. if i'm wrong give me the details on that.

good luck

share|improve this answer
    
wp_pagenavi() call is automatically inserted by the plugin (not manually by me)..maybe the best way is to manually do so myself. The problem is wp-pagenavi lacks the option to disable automatic insertion. For Page Templates check this link. Another issue is if i use is_page() that will make navigation not show up on pages using custom templates using the loop to show posts and what i want is to show that navigation on certain such pages and not on others. –  Shinnok Jan 3 '11 at 13:57
    
Indeed.. after a deep inspection the theme files were calling wp_pagenavi(). Now all that was left to do is remove the call from the custom page templates as needed. –  Shinnok Feb 14 '11 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.