How to print the Post Content more than once in the same page

By default, Elementor won’t let you print the content of the same post more than once in the same page.

This limitation is documented here: https://elementor.com/help/post-content-widget/ and it makes sense for the scenario that they are mentioning. But there are cases when this limitation becomes a problem. For example, if you have a page with multiple Loop Grid widgets, and the same post appears in more than one loop, it’s very likely that you want to print the post content for that post again.

Fortunately, we have a simple workaround for this.

1. Create a shortcode to display the post content #

Add the following code to your functions.php

				
					<?php
/**
 * Shortcode: Post Content
 * 
 * Prints the content of the current post in the loop. Helps to display
 * the same content in more than 1 Loop Grid in the same page. Because
 * the Post Content widget only displays the same content once in a page.
 * 
 * Note:  Only one instance of the Post Content widget can be used on a Single Post Template.
 * You cannot add multiple Post Content widgets on a Single Post Template, and then try to hide
 * the variations based on device (such as hiding an instance of it on mobile or tablet). Adding
 * multiple instances of the Post Content widget, even if you select to hide them per device, 
 * will result in the widgets not functioning properly.
 * (See note on https://elementor.com/help/post-content-widget/)
 */
add_shortcode( 'mm_post_content', function() {
	return wpautop( get_the_content() );
} );

				
			

2. Add a Text Editor widget instead of a Post Content widget #

Add a Text Editor widget where you want to print the post content instead of the Post Content widget.

You could also use the Shortcode widget, but that won’t allow you to control the style of the content, that’s why we will use this widget instead.

3. Configure the Text Editor widget to print the post content #

Finally, click on the Dynamic Tags button in the Content settings of the Text Editor widget. It’s the database icon that appears after Visual and Text:

Then find and select the Shortcode option (it’s under the Site section).

The WYSIWYG editor will be replaced with the following fields. Click on the Settings icon and add the [mm_post_content] shortcode to the Shortcode field.

And that’s it! The post content will be printed even if it was already printed on another loop on this page.

Powered by BetterDocs

Newsletter

Subscribe and stay connected through our Newsletter. We send out important news, tips and special offers.

  • This field is for validation purposes and should be left unchanged.