How do I change the URL returned by next_posts_link()?
-
I am integrating a WordPress blog into my existing portfolio, mysite.com. The WordPress default “twenty twelve” blog appears on mysite.com/blog/. I want to integrate WordPress functionality into my existing portfolio, so I have created a page at mysite.com/blog.php. I just added the next/previous page functions to the blog page. My problem is that the next_posts_link() function does not return the correct URL.
URL FOR THE BLOG PAGE USING MY PORTFOLIO’S LAYOUT
“mysite.com/blog.php”DESIRED “NEXT PAGE” URL (ASSUME THIS WORKS):
“mysite.com/blog.php?paged=2”URL CURRENTLY RETURNED (DO NOT WANT!):
“mysite.com/blog/.php?paged=2”URL OF THE DEFAULT WORDPRESS BLOG (WHICH I DON’T WANT USERS TO EVER SEE BECAUSE I WANT THEM TO SEE):
“mysite.com/blog/”How do I change the URL returned? I think my lack of fluency in WordPress, PHP, and regular expressions is making this much harder than it should be for me.
Also, I will probably need to change the previous_posts_link() URL too.
- The topic ‘How do I change the URL returned by next_posts_link()?’ is closed to new replies.