How to get a page url by a page id?

I tried to use get_page_link(‘page-id’) and get_permalink(‘page-id’) but the error below occurred. Fatal error: Call to a member function get_page_permastruct() on null in … How can I get a page url knowing only its ID? 2 Answers 2 You’re probably getting that error because WordPress doesn’t have the $wp_rewrite global loaded yet for some reason. … Read more

Paged posts – how to use numbers and next/previous links?

I want wp_link_pages (mutli-page posts) to display the page numbers, the word “previous” before those numbers, and a “next” after those numbers. It would look like this: Prev 1, 2, 3, 4 Next I’m attempting to do this without a plugin. Here’s what I’ve tried so far, but it isn’t working, it is only displaying … Read more