Skip to content

Shortcodes

Use these shortcodes in posts, pages, or widgets. When post_id is omitted, the current post is used (in the loop).


Shows related posts for the current (or given) post.

AttributeValuesDefaultDescription
typerelation type slugrelated_toe.g. related_to, parent_of, depends_on
limit1–505Max number of posts
orderdate, titledateSort order
post_idpost ID or 0current postSource post; 0 = current
layoutlist, gridlistList or grid layout
titletext“Related Content”Heading above the list
classCSS classesExtra wrapper class(es)
show_thumbnail0, 10Show post thumbnail
excerpt_lengthnumber (words), 0 = none0Excerpt length

Examples:

[naticore_related_posts]
[naticore_related_posts type="related_to" limit="6" layout="grid" title="You might also like"]
[naticore_related_posts type="parent_of" limit="10" order="title" show_thumbnail="1" excerpt_length="15"]
[naticore_related_posts post_id="123" type="related_to" limit="5"]

Shows related users (e.g. authors, who bookmarked/favorited).

AttributeValuesDefaultDescription
typerelation type slugauthored_bye.g. authored_by, favorite_posts, bookmarked_by
limit1–505Max number of users
orderdate, namedateSort order
post_idpost ID or 0current postSource post; 0 = current
layoutlist, gridlistList or grid layout
titletext“Related Users”Heading above the list
classCSS classesExtra wrapper class(es)

Examples:

[naticore_related_users]
[naticore_related_users type="authored_by" limit="5" title="Contributors"]
[naticore_related_users type="bookmarked_by" limit="10" layout="grid" title="Saved by"]

Shows related taxonomy terms for the current (or given) post.

AttributeValuesDefaultDescription
typerelation type slugcategorized_ase.g. categorized_as
limit1–505Max number of terms
orderdate, namedateSort order
post_idpost ID or 0current postSource post; 0 = current
layoutlist, gridlistList or grid layout
titletext“Related Terms”Heading above the list
classCSS classesExtra wrapper class(es)

Examples:

[naticore_related_terms]
[naticore_related_terms type="categorized_as" limit="5" layout="grid" title="In these collections"]
[naticore_related_terms post_id="456" type="categorized_as" limit="10"]

Styling

When any of these shortcodes is used, the plugin enqueues shortcodes.css. You can override with your own CSS by targeting:

  • .naticore-related-posts, .naticore-related-users, .naticore-related-terms
  • .naticore-related-list, .naticore-related-grid
  • Optional class attribute for your own wrapper class

Widget

The Related Content (NCR) widget uses the same output as the posts shortcode. Add it under Appearance → Widgets; options include title, relationship type, number of items, order, and optional post ID. See Widget.


See also

Schema stable from 1.x onward. Backward compatibility guaranteed.