Embedded Posts

plugin banner

Reuse any piece of your content anywhere on your site.

Author:Cooperative IT (profile at wordpress.org)
WordPress version required:5.9
WordPress version tested:6.5.2
Plugin version:1.0.7
Added to WordPress repository:05-03-2024
Last updated:15-04-2024
Rating, %:0
Rated by:0
Plugin URI:https://embedded-posts.cooperativeit.co.uk
Total downloads:355
plugin download
Click to start download

Reuse any piece of your content anywhere on your site. Display related content via category, tags, author, post ID or title using either a block or a shortcode.

Choose from:

  • a single Specific Post (post/page/CPT) with a specific title or post ID
  • a number of Related Posts (posts/pages/CPTs) which are related to the content you are creating through tags, categories, or the author of the original post.

You can us the Embedded Posts block in your content directly on Posts, Pages, Custom Content in the WordPress Block Editor and in Templates using the WordPress Site Editor. If you are not using a Block Theme you can use shortcode both on Posts, Pages, Custom Content or directory into your php templates.

Perfect for Portfolio sites, Magazine sites, Portals, your Home page and News pages. Anywhere you need to showcase your existing content.

Increase your visitor engagement by automatically directing your visitors to other content they might enjoy.

The Embedded Posts block ensures content embedded in multiple places on your site remains up to date with the original, saving you from duplicating effort and eliminating errors.

Key Features

  • embed one or more existing pieces of content anywhere you can use the WordPress Block Editor.
  • display as much or as little of the content as you like: Featured image, excerpt, the full content and even your custom fields.
  • define the exact content to display (the same Post, every time) or choose how content will be displayed (Related Posts).
  • works with Posts, Pages and Custom Post Types.
    . lots of sorting and ordering options.
  • mix and match content as you please.
  • all settings are in the editor: no coding required.
  • use Site Editor’s built-in tools to style your embedded content.
  • works with Site Editor or traditional PHP templates, from template parts to your whole theme.
  • no other plugins required.

Related Posts can show a mix of posts, pages, CPTs, or any specific selection, offering you the flexibility to curate your content as you like.

You have the option to sort the embedded content by date or name order, in both ascending and descending formats. Additionally, there is a feature for random sorting.

The Embedded Posts block seamlessly integrates with the WordPress Block Editor and the WordPress Site Editor or can be implemented through a WordPress shortcode. As Embedded Posts is a block variation of a Query Loop you have full control of the appearance of the Embedded Post within the WordPress Block Editor and WordPress Site Editor.

Another feature included in Embedded Posts is the ability to enable taxonomies on pages, a functionality not found in basic WordPress features.

Examples

You could use Embedded Posts to:

  • show 3 (or any number of) of the most recent news items on your Home page.
  • show a nicely formatted image, title, and excerpt of the last three posts by the author of a post at the end of that post.
  • show the content of a post called “My First Blog Post” in the middle of a post called “My Second Blog Post”.
  • show the titles and excerpts of 5 (or any number of) other posts that are also tagged “environment”.
  • show a mixture of pages, posts, and custom post types that also have the category “trees” on a page that is in the “trees” category.
  • show post 2 on page 1.
  • add a block to show other projects you’ve done with the same tag on your Portfolio site.
  • show readers “Other articles they may be interested in” on your Magazine site.

You can of course also sort those pieces of content, randomly, by date, or title, in ascending or descending order.

Support/Issues

Please use either the support forum or the official GitLab repository for any questions or to log issues.

Using Embedded Posts

Once the plugin is installed you can add an Embedded Post block or shortcode to your templates, posts, pages or custom posts types.

Simply go to the place where you want to display the Embedded Posts and either paste in one of the shortcodes given below, or add a new block of type ‘Embedded Posts’ and configure it as you would any other block in the WordPress Block Editor.

NOTE: If you want to use Embedded Posts to show Related Content (for example by Category/Tag/Author) make sure the content you are creating also has that Category/Tag/Author otherwise there will be nothing to relate to.

At it’s heart the Embedded Posts is a block variation of the standard Query Loop block and therefore is fairly similar in some of the functionality, some of which you may already be familiar with and is in WordPress by default.

Embedded Posts Settings

Embedded Posts settings can be found in the main WordPress dashboard.

Enable Taxonomies For Pages

Selecting the Enable taxonomies for pages box and clicking Save Page Taxonomies will enable Page Taxonomies.

Select Visible Components For The Shortcode

In this section you can select which component you would like to be visible when using the shortcode. Included along side each of these components is the relevant CSS class which will allow custom formatting. Once your selection has been made click Save Template Settings will enable on the frontend.

Available Controls

The following section outlines descriptions for all available options, each providing instructions on enabling the setting in either the WordPress Block Editor or the Wordpree Site Editor, along with the corresponding shortcode for alternative usage.

The term ‘Editor’ will represent either the WordPress Block Editor or the WordPress Site Editor.

Related By Tags

This is the default action for Embedded Posts and is enabled by the toggle in the Related By section of the settings panel in the Editor.

[embeddedposts]

or

[embeddedposts related_by_tag=1]

Related By Category

This can be enabled by the toggle in the Related By section of the settings panel in the Editor.

[embeddedposts related_by_tag=0 related_by_category=1]

Related by Tag AND Related By Category

By enabling both toggles for Related by Tags and Related by Category in the Related By section of the settings panel in the Editor and ensuring that the AND operator radio button is enabled.

[embeddedposts related_by_tag=1 related_by_category=1]

or

[embeddedposts related_by_tag=1 related_by_category=1 related_by_operator='AND']

Related by Tag OR Related By Category

By enabling both toggles for Related by Tags and Related by Category in the Related By section of the settings panel in the Editor and ensuring that the OR operator radio button is enabled.

[embeddedposts related_by_tag=1 related_by_category=1 related_by_operator='OR']

Related By Author

This can be enabled by the toggle in the Related By section of the settings panel in the Editor.

[embeddedposts related_by_tag=0 author=1]

Search By Title

Enter the title that is to be searched for in the Title box in the Single Post section of the settings panel in the Editor. The title needs to be an exact match although it is not case sensitive.

[embeddedposts title='string']

Search By ID

Enter the Post ID that is to be searched for in the Post ID box in the Single Post section of the settings panel in the Editor.

[embeddedposts post_id=(number)]

Posts Per Page

This can be set by using the slider in the settings panel in the Embedded Posts Settings in the Editor. The current range is from 1 * 10.

[embeddedposts posts_per_page=(number)[default: all]]

Post Types

Post types can be entered into the Post Type box in the Embedded Posts Settings in the settings panel in the Editor. You have the flexibility to modify the post type for searching or add additional post types, enabling simultaneous searching across multiple post types.

[embeddedposts post_type='post']

This can take multiple values; these values should be comma-separated.

Order of Returned Posts

The order of the returned posts can be selected using the Order By drop-down in the Embedded Posts Settings in the settings panel in the Editor. Alternatively, the random toggle in the same area can be enabled for a random order of the returned posts.

[embeddedposts order_by=[AZ, ZA, 123, 321, random]]

Alphabetically, reverse alphabetically, date ascending, date descending, or random


Screenshots
FAQ
ChangeLog