wp_logout_url isn’t forwarding to correct link

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

Emailing only the users of a MultiSites Sub-Sites

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

Rewrite rules in multisite

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

display merged posts from multisite and sort by latest date

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

Manipulate list of themes in wp-admin

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

Getting an ERROR: Cookies are blocked error when logging in to a site on a different domain?

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’, ”);

Set multisite settings when new site created

install.php is only run during installation, it wont be run during new site creation. You’d need to put that code in a mu-plugin to have any chance of running. (I guess it could also exist in a network-activated plugin, but I’m not 100% sure of that) Add the following before your code, and put your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)