first load of the page gives 404 error
first load of the page gives 404 error
first load of the page gives 404 error
Try the following code. Based on these two Q&A’s (not tested): How to add Custom Blog Options to new blog setup form? Programmatically set page_on_front add_action( ‘wpmu_new_blog’, ‘process_extra_field_on_blog_signup’, 10, 6 ); function process_extra_field_on_blog_signup( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { switch_to_blog($blog_id); $homepage = get_page_by_title( ‘Sample Page’ ); if ( $homepage ) { update_blog_option( $blog_id, … Read more
It’s likely down to an nginx configuration if your server runs nginx. For example, an nginx default config could contain:- if ($host ~* ^www.domain.co.uk) { rewrite ^(.*)$ https://domain.co.uk$1 permanent; } This would result in your server trying to set a 301 redirect from www to non www but then when www is defined in WordPress, … Read more
WordPress multisite and one database
Pointing multiple subdomains at the same WordPress Installation
How do I combine wp_redirect and add_filter?
Remove blog slug from WPMU?
You should be able to create a role for your wholesalers and then toggle price based on membership in that role, or limit access to certain “Pages” to members of that role. That is going to be much easier than multiple linked sites. Your question is lacking detail and code (which might be closed source … Read more
Found it with help from a Twitter follower! Might be handy for others. Get your backup table and import in to your live DB with a new name, e.g. wp_posts_updated. Then run this query: UPDATE wp_X_posts LEFT JOIN wp_posts_updated ON wp_posts_updated.post_name = wp_X_posts.post_name SET wp_X_posts.post_content = wp_posts_updated.post_content WHERE wp_posts_updated.post_name = wp_X_posts.post_name DON’T import your backup … Read more
Your best bet would be to match $_SERVER[‘HTTP_HOST’] variable against desired host. Unfortunately wordpress init WP_DEBUG constant before multisite functions are loaded.