Previewing 2 different blogs on mainpage

enter image description here

Sorry if repeat. Couldn’t find similar problems.

I have a mainpage that calls for posts from either of my two blogs with WP installed in each. In total, there are 3 webpages: the mainpage (folder “public_html” in image), the projects blog page (folder “projects”), and the general blog page (folder “blog”). All webpages are titled ‘index.php’ in their respective folders.

Everything seems to work fine, except at random moments when I load the projects webpage, it shows the main webpage instead, but with the URL of the projects webpage (i.e. entering shows the webpage for, without redirecting the URL). After waiting about a minute then refreshing, the project webpage is fine, so perhaps it’s a browser caching issue?

EDIT: directly putting in the url (without adding index.php at the end) seems to cause the problem on other devices and browsers.

My mainpage file uses the require() function twice (each for specifying which WP environment to use) to preview each blog.

Idk if there is an easier way to set this up so webpages don’t mix.

Thanks for any insights!

Read more here: Previewing 2 different blogs on mainpage

Leave a Reply

Your email address will not be published. Required fields are marked *