WordPress Multi-site subdirectory not working on server only on localhost
I’m looking into using Wordpress Multi-site to have a three separate wordpress sites on one installation of Wordpress.
Using switch_to_blog in pre_get_posts hook
I have a multisite WordPress with two sites in it (two languages), and I’m developing a theme for both of them.
I have a custom type (named ‘lesson’) that I want to have it shown in both of the sites.
So I ended up using pre_get_posts
hook to reach my purpose, but the problem is when I change the blog id in this action
, the other action
s (and filter
s) don’t work anymore!