<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elementor Archives -</title>
	<atom:link href="https://codekosh.com/category/elementor/feed/" rel="self" type="application/rss+xml" />
	<link>https://codekosh.com/category/elementor/</link>
	<description></description>
	<lastBuildDate>Tue, 05 Aug 2025 18:45:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://codekosh.com/wp-content/uploads/2025/08/Fav-ico-150x150.jpg</url>
	<title>Elementor Archives -</title>
	<link>https://codekosh.com/category/elementor/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Use custom Shortcodes to Render Elementor Saved Templates</title>
		<link>https://codekosh.com/how-to-use-custom-shortcodes-to-render-elementor-saved-templates/</link>
					<comments>https://codekosh.com/how-to-use-custom-shortcodes-to-render-elementor-saved-templates/#respond</comments>
		
		<dc:creator><![CDATA[Shubham Rana]]></dc:creator>
		<pubDate>Mon, 23 Dec 2024 11:34:59 +0000</pubDate>
				<category><![CDATA[Core Php]]></category>
		<category><![CDATA[Elementor]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://codekosh.com/?p=1061</guid>

					<description><![CDATA[<p>Elementor is one of the most popular page builders used in the wordpress, but its free version doesn’t allow you [&#8230;]</p>
<p>The post <a href="https://codekosh.com/how-to-use-custom-shortcodes-to-render-elementor-saved-templates/">How to Use custom Shortcodes to Render Elementor Saved Templates</a> appeared first on <a href="https://codekosh.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="1061" class="elementor elementor-1061">
				<div class="elementor-element elementor-element-68c8d42 e-flex e-con-boxed e-con e-parent" data-id="68c8d42" data-element_type="container" data-e-type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-5fdfcfd elementor-widget elementor-widget-text-editor" data-id="5fdfcfd" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Elementor is one of the most popular page builders used in the wordpress, but its free version doesn’t allow you to use saved templates via shortcodes. Luckily, with a bit of custom code, you can achieve this functionality and make your templates reusable throughout your site.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-db87d93 elementor-widget elementor-widget-heading" data-id="db87d93" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h3 class="elementor-heading-title elementor-size-default">What Are Shortcodes in WordPress?
</h3>				</div>
				</div>
				<div class="elementor-element elementor-element-bdf138b elementor-widget elementor-widget-text-editor" data-id="bdf138b" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Shortcodes are small pieces of code that allow you to insert dynamic content into WordPress pages or posts. The shortcode will be dynamically renders a saved Elementor template with the template ID.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-75196ad elementor-widget elementor-widget-heading" data-id="75196ad" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h3 class="elementor-heading-title elementor-size-default">Step-by-Step Guide to Render Elementor Saved Templates</h3>				</div>
				</div>
				<div class="elementor-element elementor-element-58a2e47 elementor-widget elementor-widget-text-editor" data-id="58a2e47" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									Step 1: Create a custom function in your active theme file <strong>functions.php</strong> file.

Copy the below code and add in your <strong>functions.php</strong> file.								</div>
				</div>
				<div class="elementor-element elementor-element-045499b elementor-widget elementor-widget-html" data-id="045499b" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
					<pre>
function codekosh_render_elementor_template($atts) {
    $atts = shortcode_atts(
        array(
            'id' => '',
        ),
        $atts,
        'elementor_template'
    );

    $template_id = intval($atts['id']);

    // Prevent recursion or invalid ID
    if (!$template_id || get_the_ID() == $template_id) {
        return '<!-- Invalid or Recursive Template Call -->';
    }

    // Make sure Elementor is loaded
    if (!did_action('elementor/loaded')) {
        return '<!-- Elementor not loaded -->';
    }

    // Enqueue necessary frontend assets (important for guests)
    Elementor\Plugin::$instance->frontend->enqueue_styles();
    Elementor\Plugin::$instance->frontend->enqueue_scripts();

    // Buffer output to return as shortcode
    ob_start();
    echo Elementor\Plugin::$instance->frontend->get_builder_content_for_display($template_id);
    return ob_get_clean();
}
add_shortcode('elementor_template', 'codekosh_render_elementor_template');

</pre>				</div>
				</div>
				<div class="elementor-element elementor-element-0798f16 elementor-widget elementor-widget-text-editor" data-id="0798f16" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Step 2: Create and Save an Elementor Template.</p><ul><li>Go to Templates &gt; Saved Templates in the WordPress admin area.</li><li>Click Add New, design your section, and save it.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-8c7d9ab elementor-widget elementor-widget-image" data-id="8c7d9ab" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
												<figure class="wp-caption">
											<a href="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z.jpg" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="image_2024_12_23T12_29_14_677Z" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA4MSwidXJsIjoiaHR0cHM6XC9cL2NvZGVrb3NoLmNvbVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNFwvMTJcL2ltYWdlXzIwMjRfMTJfMjNUMTJfMjlfMTRfNjc3Wi5qcGcifQ%3D%3D">
							<img fetchpriority="high" decoding="async" width="1024" height="405" src="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z-1024x405.jpg" class="attachment-large size-large wp-image-1081" alt="" srcset="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z-1024x405.jpg 1024w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z-300x119.jpg 300w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z-768x304.jpg 768w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z-1536x607.jpg 1536w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_29_14_677Z.jpg 1920w" sizes="(max-width: 1024px) 100vw, 1024px" />								</a>
											<figcaption class="widget-image-caption wp-caption-text"></figcaption>
										</figure>
									</div>
				</div>
				<div class="elementor-element elementor-element-016a840 elementor-widget elementor-widget-text-editor" data-id="016a840" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<ul><li>Note down the Template ID from the template list.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-a7f4012 elementor-widget elementor-widget-image" data-id="a7f4012" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
												<figure class="wp-caption">
											<a href="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="image_2024_12_23T12_37_03_600Z" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA4MCwidXJsIjoiaHR0cHM6XC9cL2NvZGVrb3NoLmNvbVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNFwvMTJcL2ltYWdlXzIwMjRfMTJfMjNUMTJfMzdfMDNfNjAwWi5wbmcifQ%3D%3D">
							<img decoding="async" width="1024" height="562" src="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-1024x562.png" class="attachment-large size-large wp-image-1080" alt="" srcset="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-1024x562.png 1024w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-300x165.png 300w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-768x421.png 768w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-1536x842.png 1536w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_37_03_600Z-2048x1123.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" />								</a>
											<figcaption class="widget-image-caption wp-caption-text"></figcaption>
										</figure>
									</div>
				</div>
				<div class="elementor-element elementor-element-7cccfd3 elementor-widget elementor-widget-text-editor" data-id="7cccfd3" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Step 3: Use the Shortcode</p><ul><li>Add the following shortcode wherever you want the saved template to appear as I have used under the elementor tabbing widget:</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-e61b13a elementor-widget elementor-widget-image" data-id="e61b13a" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
												<figure class="wp-caption">
											<a href="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z.jpg" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="image_2024_12_23T12_52_03_700Z" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA4NCwidXJsIjoiaHR0cHM6XC9cL2NvZGVrb3NoLmNvbVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNFwvMTJcL2ltYWdlXzIwMjRfMTJfMjNUMTJfNTJfMDNfNzAwWi5qcGcifQ%3D%3D">
							<img decoding="async" width="1024" height="394" src="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z-1024x394.jpg" class="attachment-large size-large wp-image-1084" alt="" srcset="https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z-1024x394.jpg 1024w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z-300x115.jpg 300w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z-768x296.jpg 768w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z-1536x591.jpg 1536w, https://codekosh.com/wp-content/uploads/2024/12/image_2024_12_23T12_52_03_700Z.jpg 1920w" sizes="(max-width: 1024px) 100vw, 1024px" />								</a>
											<figcaption class="widget-image-caption wp-caption-text"></figcaption>
										</figure>
									</div>
				</div>
				<div class="elementor-element elementor-element-8622f0e elementor-widget elementor-widget-text-editor" data-id="8622f0e" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<ul><li>Replace the ID of your saved template in the ShortCode.</li></ul>								</div>
				</div>
					</div>
				</div>
				</div>
		<p>The post <a href="https://codekosh.com/how-to-use-custom-shortcodes-to-render-elementor-saved-templates/">How to Use custom Shortcodes to Render Elementor Saved Templates</a> appeared first on <a href="https://codekosh.com"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codekosh.com/how-to-use-custom-shortcodes-to-render-elementor-saved-templates/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
