a-ok Posted February 9, 2015 Share Posted February 9, 2015 I am setting up some simple pagination for a page, and want to use the $page->next or $page->prev functions. Everything works as I want, except for one part – checking whether a next/prev page exists or not. So, for example, this works within my code <?php if ($page->next->journal_featured_image) : ?> but if I wrapped the whole section in <?php if ($page->next) : ?> it doesn't seem to make any difference. I tried count too... but no use. Any ideas? Thanks, R Link to comment Share on other sites More sharing options...
a-ok Posted February 9, 2015 Author Share Posted February 9, 2015 Fixed this with <?php if ($page->next->id) : ?> 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now