{"id":595382,"date":"2007-07-17T23:19:18","date_gmt":"2007-07-17T23:19:18","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/evaluate-if-next_posts_link-will-return-results\/"},"modified":"2016-08-18T23:09:38","modified_gmt":"2016-08-18T23:09:38","slug":"evaluate-if-next_posts_link-will-return-results","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/evaluate-if-next_posts_link-will-return-results\/","title":{"rendered":"evaluate if next_posts_link() will return results"},"content":{"rendered":"<p>Hi All,<\/p>\n<p>Wondering if anyone has a solution to use an if statement that looks at whether or not next_posts_link() will actually be populated or not. If there is a paged set of posts that next_posts_link() will allow the user to continue on, I want to put a header before the next and previous links.<\/p>\n<p>If next_posts_link() isn&#8217;t going to return anything, I don&#8217;t want to put that markup in. I thought this would be relatively simple, but so far no luck. Any advice would be very much appreciated!<\/p>\n","protected":false},"template":"","class_list":["post-595382","topic","type-topic","status-closed","hentry","topic-tag-navigation","topic-tag-next_posts_link"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/595382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/595382\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=595382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}