Jump to content

Check whether next/prev page or not


a-ok
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...