WordPress Short Code

From many handful option our plugin provides standard for WordPress option – short code. We usually recommend other modern options to embed the widget into the articles and pages, like Gutenberg block, WordPress widget or Elementor widget. However we also provide old fashion short code for the people who finds it more convenient. Shot code provides absolutely the same functionality as other available widget options. So, lets describe the functionality and parameters briefly.

[rel_posts keyword="plugin" num="post=3&product=3" align="left" exclude="617" width="50%" order="random"][/rel_posts]

Here is a working example of the short code above:

Related Posts Short Code Parameters

keyword – search keyword or keywords that will help to generate the suggestions for the widget.

num – defined the number of certain types that had to be included into the suggestions. This parameter has URL parameters notation. For example:


exclude – comma separated list of post IDs that should not be included into suggestions. Posts can be of any enabled type.

include – comma separated list of post IDs that should be included into suggestions. Posts can be of any enabled type.

width – width of the block. Any of the css formats.

style – suggestion widget layout style. Possible values are:

  • thumb-row – row layout with thumbnails
  • thumb-column – column layout with thumbs
  • txt-row – row layout text only
  • txt-column – column layout text only

align – suggestion block alignment. Possible values are left, center, right.

order – order of the suggestions in a suggestion block. Possible values are:

  • default – default order, suggestions as is
  • random – random order of generated suggestions
  • alpha_asc – alphabetical ascending order
  • alpha_desc – alphabetical descending order
  • date_asc – ascending order by publish date
  • date_desc – descending order by publish date

show_date – post suggestions will display post publish date.

more – this option allows to display “More” button that will redirect visitor to the search page with the appropriate search parameters.

WordPress Short Code