Replace “content-area” of themes 404 page with plugin?

According to the Template Page hierarchy, https://developer.wordpress.org/files/2014/10/wp-hierarchy.png the only template page WP will load is 404.php But, you might try this in your mu-plugins: //Some function to check database to see if this URL should exist if ( ! checkIfPageExists( $_SERVER[‘REQUEST_URI’] ) ) { //Set 404 Status status_header( “404” ); get_header(); //do your custom 404 … Read more

WordPress Database Cleanup

WP is designed to use a single database. In fact you can have several sites in a single database because they’d each use a different table prefix. How difficult it’ll be to cleanup will depend on the code involved. I’d be mostly concerned that since the previous developer (I use the term loosely) didn’t use … Read more

Different query result on local and server

Can you try using another date format? Example: foreach ($blogs AS $blog) { switch_to_blog($blog[“blog_id”]); $yesterday_today = array( ‘order’ => ‘ASC’, ‘orderby’ => ‘date’, ‘date_query’ => array( array( ‘after’ => array( ‘year’ => date(‘Y’,strtotime(“-1 days”)), ‘month’ => date(‘n’,strtotime(“-1 days”)), ‘day’ => date(‘j’,strtotime(“-1 days”)), ), ‘before’ => array( ‘year’ => date(‘Y’), ‘month’ => date(‘n’), ‘day’ => date(‘j’), … Read more

Main site media are accessible in subsite domain

Not sure what is the problem here, and when saying that I mean that I do not see the ROI in solving it. The core issue is that all the sites of a multisite are mapped to the same “physical” directory structure, and media files are simply served from the relevant upload directory when the … Read more

Multisite with Different URLs on Local Server

See my answer here, which might be helpful in resolving your problem. Domain names for sub-sites in multisites are contained in the site’s Settings. The answer tells you how to get there, and the htaccess commands which may help. Trying to migrate a WordPress Multisite with Domain Mapping