Get posts from the Main site to sub site – WordPress MultiSites Network

I use this codes to loop over the posts in the Main site: <?php $sites = wp_get_sites(); foreach($sites as $site) : // Only subsites // Connect to new multisite switch_to_blog($site[‘blog_id’]); $case_args = array( ‘post_type’ => ‘downloads’, ‘posts_per_page’ => 1, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ); $latest_cases = new WP_Query($case_args); if ( $latest_cases->have_posts() ) : … Read more

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

How to make category RSS feeds show full content

Full Text Feed plugin shows full content….follow the installation steps there,and then goto settings->Reading->For each article in a feed, show=>select Full text and save.it’ll work.if you want to implement via the code means, <?php if (get_option(‘rss_use_excerpt’)) : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php else : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php if ( strlen( $post->post_content ) > … 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