Molongui Authorship

  1. Molongui
  2. >
  3. Docs
  4. >
  5. Molongui Authorship
  6. >
  7. Howto
  8. >
  9. How to display the byline anywhere

How to display the byline anywhere

Applies only to the Premium version of the plugin, release 2.0.6 or higher.
Get premium version

Molongui Authorship Premium has an option to automatically update any byline displayed on your site so assigned authors are displayed instead of the name of the user who actually created the post. That functionality has some limitations when displaying multiple authors (it cannot link each author to his/her posts archive page) and it even might cause incompatibilities with third plugins.

To overcome those limitations and possible issues, the plugin has some template tags you can use to achieve a complete integration with your theme and plugins. Check out this article to know how to use them.

But if you do not have any coding skills or prefer not to touch any code, you have another option: use the shortcode the plugin provides to display the byline. This shortcode can be used anywhere, not just in the byline of a post. Check this article out to read detailed information on how to use that shortcode.

The trivial shortcode will display the author(s) of the current post being displayed with link(s) to author(s) archive page. That would be useful to replace the default byline. Check the shortcode and its output below:

Editor input

[molongui_byline]

Frontend output

Examples

The shortcode mentioned above accepts several attributes that modify the output you get. Check this article out to know all the available attributes and its usage. You might find that useful to change the styles of the displayed text or to show authorship information from other posts, for instance. See some examples below:

Byline with custom text

The shortcode below will display the names of the authors who wrote this article preceded by the “Written by” text:

Editor input

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
[molongui_byline pid=1 before='Written by ']
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.

Frontend output

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.

Byline without links to archive author pages

You can also disable links to archive pages, so plain text will be displayed:

Editor input

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
[molongui_byline pid=1 before='Written by ' linked='no']
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.

Frontend output

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
written by Claire Williams and John Smith
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.

Credit authors of a mentioned post

It might also be interesting for you to credit the authors of a post you are mentioning:

Editor input

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
Check out this amazing post written by [molongui_byline pid='1' linked='no']. You are gonna love it!
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.

Frontend output

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam hendrerit ante ac libero imperdiet blandit.
Check out this amazing post written by Claire Williams and John Smith. You are gonna love it!
Phasellus venenatis neque non leo imperdiet pellentesque. Suspendisse varius magna velit, in blandit justo pharetra vel. Vivamus vitae arcu tortor.
Was this article helpful to you? Yes No

How can we help?