For restricting the categories, maybe the plugin Restrict Categories can help. But it doesn’t have Multisite capabilities.
Take a look at the filter list_terms_exclusions
that it uses in the cat_filter
function.
But Role Scoper states that it has “Extensive WP-mu support”. May be worth a try.
For the query part, take a look at this Q&A, find a random blogid across my multisite network that has at least one post published.
Basically, you need the functions switch_to_blog
and restore_current_blog
.
Related Posts:
- Prevent duplicate pages from being added
- Should we trust the post globals?
- How to Display Network Post Count?
- How to cache a shortcode functions output?
- Querying post from a multisite network
- How to know if get_posts() failed?
- how to enable different number of revisions for different blogs when using WPMU?
- Duplicate posts
- Looping through posts per category gives same posts for each category
- How to show posts rank based on custom field value
- How do I create Comma Separated list of attached image ids?
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- How to share same post to multiple site in wordpress?
- wp_enqueue_media() slows down my WP site
- Pull posts from another wordpress install on same server
- How can I get all posts data from within a paginated search result?
- posts_per_page doesnt work
- Sorting posts according to view counts not working
- Only display posts after current date
- Improving WP_Query for performance when random posts are ordered
- Multisite – Get current post id
- Get posts by name and taxonomy term
- WP_Query Authors OR Categories
- do_shortcode within post query
- Get Meta Key Value While Saving Post
- Most liked page not displaying posts
- Query get post,how to add comment box
- Unable to restore from backup – how to obtain old blog posts?
- Pagination with an array of post objects?
- get query() without post content?
- How can I setup a relationship using categories in WordPress?
- posts_per_page option limits the number of Gallery items
- How i can limit period of post publication?
- Exclude current custom post on single post
- Dynamically switch template on click
- Get all custom post types excepted some…
- Get all comments of author’s posts
- First x post with another template then the others
- Why Query is returning empty array?
- Delete all drafts?
- meta_value timestamp older than now
- Counter is skipping post when I still want it visible [closed]
- Do not show children of a category
- post__in not working with pre_get_posts, but post__not_in does work
- How to get all post_parents of a post?
- Query for first 3 posts to change the look and feel
- Query posts and filter at query time by value of custom meta
- Run query_posts if SESSION is empty?
- Very complex post query
- Delete post revisions only for a single post
- How to give classname to post if post has no content?
- Display post by click on the link
- How to retrieve certain number of images from a wordpress post?
- How to convert query sql to shortcode in wordpress?
- Some doubts about how the loop work (trying debugging it)
- Cannot select certain authors for posts after import
- How to display only one category in a custom post type?
- Adjust the order for returned posts
- Trim posts from WP-Query?
- Anyone know a php snippet for showing the first 200 characters of the most recent post?
- Trying to exclude custom posts based on date, while sorting by custom field
- how to add tags to post in the Loop?
- Merge get_comments & get_posts into a single query
- How to optimize posts query in wordpress
- Query to fetch custom taxonomy along with post title
- How to fetch courses in all languages in WordPress?
- How to search through “post title” and “tags” using WP_Query?
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Multisite Issue on Subdomain’s article pages
- I have two post types in the same query, how can I use CSS to select only one post type?
- filter posts based on menu_order
- Bulk Post update_post_meta
- Populate a drop down list with post titles across a multisite network
- Show 5 posts and than 3 posts offset with pagination
- How to delete all posts with dead image urls?
- Numbering author posts in posts query
- How to run select query of post with category and tags?
- Query posts from newest category
- wp query custom orderby not custom field
- Custom Select Query pagination not working properly
- Query post by meta key of another table
- Sort / Filter Queries
- Query post category & remove any post id
- Display the latest post from some selected authors
- Ordering posts alphabetically by meta keys and title
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Grab next post title in archive page
- How to get posts from network blog
- Continuous listing from a custom field
- Displaying Results From Custom Taxonomy Query
- How to store post rating system data post independent?
- Users cannot post when editor or admin on more than 1 site on multisite
- How to link two news page multilingual press
- Get first comment link on the post itself
- Make division in post_query?
- Get image paths from RSS feeds
- making a few sites in wordpress
- Display one post randomly from category on home page
- Display posts with id equal to relationship value
- Sort Posts Alphabetically Based on Specific Category (Divi)