[molongui_author_posts]

Applies only to the Pro version of the plugin, release 2.0.10 or higher.
Go Pro!

This shortcode allows you to display a list showing (all the) posts from any given author anywhere you want.

It can be used anywhere within WordPress where shortcodes are supported. For most users, this will primarily be within the content of a WordPress post or page or the sidebar.

That posts list can be customized making use of the optional attributes this shortcode can take.

Example

The trivial shortcode to display a Molongui Posts List looks like this:

Editor input

[molongui_author_posts]

That would display a list of posts showing post title, featured image and byline. Check output below:

What if you had a lot of posts to list and you wanted to display just, let’s say, 2 per page? You have a convenient argument for that: paginate

Editor input

[molongui_author_posts paginate=2]

Frontend output

You can easily change how the list to display will look like by choosing from available layouts – “plain”, “flat”, “thumbs”, “cards” or “preview”. Let’s say you want to display the list using the “plain” layout. You should use the shortcode like below:

That might be quite an austere way to display your posts. So let’s check how they would look using the “thumbs” layout:

Editor input

[molongui_author_posts layout=plain]

Frontend output

And what about the “cards” layout?

Editor input

[molongui_author_posts layout=cards]

Frontend output

  • on
    In ac erat tincidunt, accumsan orci et, faucibus neque. Maecenas scelerisque ac risus volutpat auctor. Etiam eu ex purus. Praesent tempus posuere tincidunt. Pellentesque in
  • on
    Ut placerat, eros vitae posuere blandit, diam lacus pulvinar nulla, quis accumsan mauris quam vel turpis. In sit amet blandit tortor. Integer egestas rutrum nunc
  • on
    In dictum dui est, eu bibendum odio porta et. Praesent purus libero, sollicitudin vitae sollicitudin et, fermentum quis justo. Suspendisse potenti. Nunc ac ultrices dolor.

Finally, let’s say you want to display your posts like you might find them on any blog around. You can use the “preview” layout for that. Check below:

Editor input

[molongui_author_posts layout=preview]

Frontend output

  • on
    In ac erat tincidunt, accumsan orci et, faucibus neque. Maecenas scelerisque ac risus volutpat auctor. Etiam eu ex purus. Praesent tempus posuere tincidunt. Pellentesque in
  • on
    Ut placerat, eros vitae posuere blandit, diam lacus pulvinar nulla, quis accumsan mauris quam vel turpis. In sit amet blandit tortor. Integer egestas rutrum nunc

Regardless of the layout you choose to display your posts, you can even customize it a little bit further using some of the available optional attributes. Take a look below!

Attributes

Check out below all the available attributes you can use to fully customize the displayed posts list:

authoroptional
Author ID. If none given, assigned main author to the current post is taken.
Accepts An integer being a User or Guest Author ID.
Available since version 1.0.0.
guestoptional
Whether the author of the posts to list is a guest author.
Accepts "yes" or "no".
Defaults to no.
Available since version 1.0.0.
layoutoptional
Layout used to display the list of posts.
Accepts "plain", "flat", "thumbs" and "cards".
Defaults to flat.
Available since version 1.0.0.
post_typesoptional
Post type to list.
Accepts "post", "page", "all", "selected" and "related".
Defaults to selected.
Available since version 1.0.0.
categoryoptional
Category ID or comma-separated list of IDs.
Accepts Comma separated IDs.
Available since version 1.0.1.
include_postsoptional
Post IDs to list.
Accepts Comma separated post IDs.
Available since version 1.0.0.
exclude_postsoptional
Post IDs to exclude from being listed.
Accepts Comma separated post IDs.
Available since version 1.0.0.
countoptional
Max number of posts to list.
Accepts Integer.
Available since version 1.0.0.
paginateoptional
Number of posts to list per page. If total posts to list is bigger than this value, the list gets pagination
Accepts Integer.
Available since version 1.1.10.
orderoptional
Designates the ascending or descending order of the "orderby" parameter.
Accepts "asc" or "desc".
Defaults to asc.
Available since version 1.0.0.
orderbyoptional
Sort retrieved authors by parameter.
Accepts "name", "date", "title", "modified" or "rand.
Defaults to date.
Available since version 1.0.0.
classoptional
CSS class to add to the <div> containing the list.
Accepts CSS class names separated by spaces.
Available since version 1.0.0.
list_iconoptional
The icon to display before the post title on the plain layout template.
Accepts "feather", "doc", "list", "user", "info", "at", "checkmark", "ok", "cancel", "plus", "minus", "star", "heart", "notice", "tip" or "none".
Defaults to feather.
Available since version 1.0.0.
list_divideroptional
Whether to add a dividing line between listed posts. Applies only to "plain" and "flat" layouts.
Accepts "yes" or "no".
Defaults to no.
Available since version 1.0.0.
link_coloroptional
Post title color.
Accepts Accepts CSS color values.
Available since version 1.0.0.
link_decorationoptional
Post title text decoration.
Accepts CSS text-decoration property values.
Available since version 1.0.0.
show_dateoptional
Whether to display post date on posts list when using "flat", "thumbs", "cards" or "preview" layouts.
Defaults to yes.
Available since version 1.0.0.
show_bylineoptional
Whether to display post byline on posts list when using "flat", "thumbs", "cards" or "preview" layouts.
Accepts "yes" or "no".
Defaults to yes.
Available since version 1.0.0.
show_excerptoptional
Whether to display post excerpt on posts list when using "cards" or "preview" layouts.
Accepts "yes" or "no".
Defaults to yes.
Available since version 1.0.0.
excerpt_lengthoptional
Number of words to display as post excerpt on posts list when using "cards" or "preview" layouts.
Accepts integer.
Defaults to 25.
Available since version 1.0.6.
meta_keyoptional
You can filter the posts retrieved by this shortcode by specifing any meta_key name existing on your installation.
Available since version 1.0.0.
meta_valueoptional
The value the specified meta_key should have in order to retrieve the post. This value is mandatory if "meta_key" attribute is being used.
Available since version 1.0.0.

Deprecated attributes

Listed attributes below were available on previous versions of the plugin, but have been removed or replaced:

max_postsoptional
Max post count to list.
Accepted integer.
Was available from version 2.0.10 to 3.2.28.
Replaced by post_count.
post_countoptional
Max post count to list
Accepted integer.
Was available from version 1.0.0 to 1.0.10.
Replaced by paginate.
list_classoptional
CSS class to add to the list <div> container
Accepted string.
Was available from version 2.0.10 to 3.2.28.
Replaced by class.
+ posts

Updated on May 6, 2020

Can't find what you're looking for?
How Can We Help?

Help Request Sent Successfully

OK, we'll get you an answer back shortly.