Molongui Authorship

  1. Molongui
  2. >
  3. Docs
  4. >
  5. Molongui Authorship
  6. >
  7. Shortcodes
  8. >
  9. [molongui_author_select]

[molongui_author_select]

Applies only to the Premium version of the plugin, release 3.2.4 or higher.
Get premium version
This shortcode is intended for developers only.
It does nothing by itself, so you need to code some logic that handles user selection.
×

This shortcode allows you to display a dropdown select listing (all the) authors from your blog.

The dropdown does nothing by itself… meaning that you need to code some logic that handles user selection. You can find it useful to selectively display author information based on user selection.

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.

Example

A trivial shortcode to display the Molongui Author Dropdown looks like this:

Editor input

[molongui_author_select]

Frontend output

For your convenience as a coder, you can also modify <select> attributes. The markup you will get is shown below:

Editor input

[molongui_author_select select_id=myId select_class=myClass select_atts=myCustomAttribute]

Frontend output

Attributes

To customize which authors to list you can use the shortcode with additional attributes. For your convenience as a coder, you can also modify <select> attributes.

Check out below all the available attributes you have available:

typeoptional
Type of authors to list.
Accepts "authors", "users" or "guests".
Defaults to authors.
Available since version 3.2.4.
orderoptional
Designates the ascending or descending order of the "orderby" parameter.
Accepts "asc" or "desc".
Defaults to asc.
Available since version 3.2.4.
orderbyoptional
Sort retrieved authors by parameter.
Accepts "name", "first_name", "last_name", "mail", "job", "company" or "post_count.
Defaults to name.
Available since version 3.2.4.
exclude_usersoptional
Comma separated list of registered authors to exclude from being listed.
Available since version 3.2.4.
exclude_guestsoptional
Comma separated list of guest authors to exclude from being listed.
Available since version 3.2.4.
with_postsoptional
Whether to list only those authors with at least one authored post.
Accepts "yes" or "no".
Defaults to no.
Available since version 3.2.4.
countoptional
Maximum number of authors to list.
Accepts integer.
Defaults to all.
Available since version 3.2.4.
select_idoptional
Id for the select.
Accepts text.
Available since version 3.2.4.
select_classoptional
CSS class(es) for the select.
Accepts text.
Available since version 3.2.4.
select_attsoptional
Custom attributes to add to the select tag.
Accepts text.
Available since version 3.2.4.
Was this article helpful to you? Yes No

How can we help?