Need non-displaying alternative to previous_post_link and next_post_link
-
I’m a noobie to WordPress, but I’ve implemented a news blog that runs under two different websites with two different URLs – but its the same newsblog. I use a virtualhost to direct both URLs to the correct directory, and then I use PHP to check which URL is being used in order to change the appearance of the theme accordingly (different theme graphics and different site nav).
The problem is that there is only one URL that wordpress can know about for the purposes of
previous_post_link
andnext_post_link
. I want to be able to get the URL string from each of these before displaying and replace a string within the URL appropriately. The problem is that there is no non-displaying version of these two functions.To clarify, here are the two sites:
1. news.pandesa.com – this is the site that wordpress knows about
2. news.sharevault.com – wordpress doesn’t know about this one
note that I have not been able to implement “next” and “previous” links in the latter case because of the problem stated above. If I were to have implemented these, the result would be that the user would bounce over to the other site when clicking ‘next’ or ‘previous’.
… So my question is this: Is there another way, using PHP, to figure out the URL of the next and previous post?
Thanks in advance!
- The topic ‘Need non-displaying alternative to previous_post_link and next_post_link’ is closed to new replies.