VI: Include Post By

Shortcodes allowing you to display posts inside other posts/pages

Author:Joseph Neathawk (profile at wordpress.org)
WordPress version required:4.0
WordPress version tested:5.4.6
Plugin version:0.4.200706
Added to WordPress repository:07-04-2020
Last updated:27-07-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://neathawk.com
Total downloads:566
Active installs:10+
plugin download
Click to start download

VI: Include Post By – provides your pages and posts with shortcodes allowing you to display other pages and posts inside them either by their ID or by post category. Options to display title,meta,content,thumbnail,excerpt,footer.

Coming Soon

More display options.
Taxonomy and post type agnostic
setable default thumbnail
grab the actual small thumbnail image for srcset

Instructions

Shortcode for including a single post by its ID

[include-post-by-id
 id="123"
 link="true"
 moretext="Continue Reading"
 card="false"
 display="title,meta,thumbnail,content,excerpt,more,footer,all"
 display_header="title,meta,thumbnail,content,excerpt,more,footer,all"
 display_body="title,meta,thumbnail,content,excerpt,more,footer,all"
 display_footer="title,meta,thumbnail,content,excerpt,more,footer,all"
 image_size="thumbnail,medium,large,full,custom-image-size"
 class_inner="custom-class-name"
 class_header="custom-class-name"
 class_body="custom-class-name"
 class_footer="custom-class-name"
 class_thumbnail="custom-class-name"
]
  • id = post to be shown
  • link = whether the title/thubmnail are links to the post
  • moretext = edit the text of the read-more link
  • card = will set class names to bootstrap cards, no further class customization is required
  • display[x] = display options as a CSV, order counts
  • class[x] = a custom class name that will be added to each container element

Shortcode for including single/multiple posts by their category.
Every option required or used in the include-post-by-id will also pass through here.
This function will query the DB and then call include-post-by-id once for each resulting post.
Shown here are only the options which are unique to this function.

[include-post-by-cat
 cat="123"
 order="DESC"
 orderby="date"
 paginate=true
 perpage="5"
 offset="0"
 class_container="custom-class-name"
]
  • cat = category to be shown
  • order = sort order
  • orderby = what to sort by
  • paginate = true/false
  • perpage = items per page. -1 = all
  • offset = how many posts to skip, useful if you are combining multiple includes
  • class_container = custom-class-name used in the wrapper element

ChangeLog