Some permalinks are not working and show 404
we found the solution: There were deleted Pages and/or Posts with the same title. We removed them and now everythings works!
we found the solution: There were deleted Pages and/or Posts with the same title. We removed them and now everythings works!
In MySQL ALTER TABLE wp_blogs AUTO_INCREMENT = 10000; Than create the new site and switch back the auto_increment ALTER TABLE wp_blogs AUTO_INCREMENT = 3;
If you use switch_to_blog, that use always also restore_current_blog. The restore_current_blog function undos the last call to switch_to_blog, but only by one step, the calls are not nestable, so always call restore_current_blog before calling switch_to_blog again.
Yes is possible. The only thing is that you will have “two sets” of permalinks: example.com/2015/07/27 example.com/new-website/2015/07/27 Here is a codex article that explains that. Edit 1: Here is a more detailed article on the topic with it’s pros/cons and potential issues.
There are a few steps you need to take to add menus, the wordpress way. Register the menu in functions.php using register_nav_menus() Codex Link: https://codex.wordpress.org/Function_Reference/register_nav_menus Example: register_nav_menus( array( ‘my_custom_menu’ => ‘My Custom menu’, ‘my_other_menu’ => ‘My Other Menu’, ) ); Now you can create new menus on the back-end Login and go to Appearance -> … Read more
Here’s how I’d attack your problem (in fact I think I’ve written code like this in the past, but I can’t find it at the moment): $blogs = array( 4, 1 ); $all_posts = array(); foreach( $blogs as $blog ) { switch_to_blog( $blog ); $args = array( ‘posts_per_page’ => 10, ‘orderby’ => ‘date’, ‘order’ => … Read more
Looking into the Theme Customizer API, it appears that theme modifications are stored as theme_mods which can be access using get_theme_mod( $mod_name ) or (if you want to grab them all) get_theme_mods(). Peeking into the source of get_theme_mods(), I see that the mods are stored in the site’s options table as theme_mod_$mod_name. So the theme … Read more
There exist two cases in your question. 1. You want different theme for different pages of single WordPress site. You can achieve this using a plugin – Multiple Themes You want different sites having different admin dashboard and different theme for each site. Then you must use MultiSite.
The easiest way is to check for get_current_blog_id(); and adjust your 404 template based on the current blog id. An other option is creating a child theme for every site and adding different page-404 templates.
If you need true localization, like a different checkout process, different themes or product descriptions, then you should use a multisite. You can activate plugins and themes per site here. The problem here is that almost all shopping plugins are not multisite compatible. You have to activate them per site, not as network plugin, or … Read more