add_rewrite_rule not registering on Multisite
Did you flush the rules after making this code? Visit the Settings->Permalinks screen. This will cause a rule flush. Then check and see if your new rule appears.
Did you flush the rules after making this code? Visit the Settings->Permalinks screen. This will cause a rule flush. Then check and see if your new rule appears.
Hi @centr0: “MultiSite” and “Create a Network” are the same thing in WordPress 3.x. Follow the steps found in Create a Network in a new subdirectory and this tutorial by Otto should show you have to map domains using the WordPress MU Domain Mapping plugin (“MU” is the legacy description of Multisite, just ignore that … Read more
The issue is you pointing entirely unrelated (from WordPress point of view) domain to WP site. When WP processes logout the redirect is performed by wp_safe_redirect(), which disallows to redirect user “outside” the site. Since it has no clue about your custom domain that link is simply discarded. I would advise to properly set up … Read more
I’m actually in the process of creating a plugin that does this, and it doesn’t seem as if there are any special considerations needed for multisite sub-blogs. When the function checks for users of the blog, it only grabs those from the current blog (in my testing). Here’s some of my code to give you … Read more
Found the answers: There is nothing to do when using the Rewrite API that isn’t written in the Codex. Rules written using add_rewrite_rule are not added to .htaccess. WP adds them to its database under rewrite_rules in the _options table. It’s important not to forget to: Filter the rewritten permalinks; call the functions on the … Read more
The solution (with template parts): $blogs = array( 1,4,5 ); $all_posts = array(); foreach( $blogs as $blog ) { switch_to_blog( $blog ); $args = array( ‘category_name’ => ‘noticias’, ‘posts_per_page’ => 2, ‘orderby’ => ‘publish_date’, ‘order’ => ‘DESC’); $blog_posts = get_posts( $args ); foreach( $blog_posts as $blog_post ) { // Correct permalink, blogname, blog url and … Read more
Probably not without editing core files. I haven’t found any hook you could use. If you look in the file wp-admin/themes.php and follow the program flow until the list of themes will be displayed, you can find the class WP_Themes_List_Table in wp-admin/includes/class-wp-themes-list-table.php. This class generates the HTML list. Following the prepare_items() method, WordPress get the … Read more
The problem was I had the old multi-site method, which used sunrise.php. I removed wpcontent/sunrise.php and the SUNRISE setting in wp-config.php I then added the relevent settings from the accepted answer on a similar question and it worked. define(‘ADMIN_COOKIE_PATH’, “https://wordpress.stackexchange.com/”); define(‘COOKIE_DOMAIN’, ”); define(‘COOKIEPATH’, ”); define(‘SITECOOKIEPATH’, ”);
This may be incomplete information, but I’ve had problems with domain mapping on multisite systems with a similar configuration as posted in your question. First, I would look at the htaccess of the main site. Make sure that any redirects is not domain-specific, so it uses something like this: RewriteEngine on RewriteCond %{HTTPS} !on RewriteRule … Read more
You could simply use the get_blogs_of_user() function: echo count( get_blogs_of_user( $user_ID ) ); instead of your custom SQL query.