"I'm always amazed when I receive the email updates showing the new plugin WPMU DEV has developed or amped up."
Recent Global Posts allows you to display a list of recent posts from across your Multisite network on your main site.
Built for your network
This plugin uses the power of Post Indexer to publish recent posts anywhere on your main site dynamically using shortcodes – on pages, posts and widget areas, such as a sidebar or footer.
Built and supported by WordPress network experts, Recent Network Posts provides the safe reliable service you need for operating a successful Multisite or BuddyPress community.
Easily control how you display recent posts:
- Choose how many posts display
- Add links to the post’s titles
- Display avatars
- Choose avatar size
- Select the number of characters to display for post titles
Help users discover new content from across your network and strengthen your sense of community with Recent Global Posts.
To Get Started:
This plugin requires the Post Indexer plugin
If you have an older version of Network Recent Posts installed in /mu-plugins/ please delete it.
Once installed and network-activated, it’s ready to use. There’s no configuration necessary!
Displaying your network posts
You can display your recent posts anywhere on your site simply by adding a shortcode. The base shortcode is:
That will display a simple list of linked titles to the 5 most recent posts in your network.
But you can use the following attributes to really customize what content to display, and how to display it:
- number=”5″ – How many posts you want to display
- title_characters=”250″ – Maximum number of characters in each title.
- content_characters=”200″ – Maximum number of characters in the content of each entry
- title_content_divider=”-“ – What to use to separate the title from the content. If this parameter is not included, the content will display beneath the title.
- title_link=”no” – By default, the title links to the post. You can use this to remove the link.
- show_avatars=”yes” – Displays the author avatar if avatars are used on your site.
- avatar_size=”32″ – Sets the square size of the avatars.
- posttype=”post-type” – Use to specify the post type to display. Default is “post”. Note that you can only specify one post-type.
So, for example, if you want to show the 3 most recent posts with a little excerpt and author avatar, you could use it like this:
[globalrecentposts number="3" content_characters="200" show_avatars="yes" avatar_size="32"]
The above shortcode would produce something like this on your site:
Don’t like the default styling? You can also use these parameters to add text or HTML elements to really customize the content, as well as layout & styling:
- title_before=”text or HTML element” – Executes before the title of each entry.
- title_after=”text or HTML element” – Executes after the title of each entry.
- global_before=”text or HTML element” – Executes above the list of entries.
- global_after=”text or HTML element” – Executes beneath the list of entries.
- before=”text or HTML element” – Executes before each entry.
- after=”text or HTML element” – Executes after each entry.
Here’s an example shortcode with some of these extra parameters. You’ll notice we’ve included headline tags for the titles, and a custom class for each entry so we can style the output with a bit of custom CSS.
[globalrecentposts number="2" content_characters="200" global_before="<h3>Here are our most recent posts. Enjoy!</h3>" before="<div class='custom-li'>" after="<hr></div>" show_avatars="yes" avatar_size="48" title_before="<h4>" title_after="</h4>"]
The above shortcode could display something like this (note that the actual CSS to be used would depend a lot on your theme, so we haven’t included that here).
We hope you enjoy using the Recent Network Posts plugin. If you need help with any of the parameters, or even for some CSS guidance, drop by the community forums where staff and other members are standing by to lend a hand.