{"id":445,"date":"2023-10-21T06:32:54","date_gmt":"2023-10-21T06:32:54","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=445"},"modified":"2023-10-21T06:32:55","modified_gmt":"2023-10-21T06:32:55","slug":"bdthemes-element-pack-lite","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/bdthemes-element-pack-lite\/","title":{"rendered":"Bdthemes Element Pack Lite Shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Bdthemes Element Pack Lite Shortcode<\/strong> to your WordPress website, including its <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Bdthemes Element Pack Lite Plugin shortcode not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Bdthemes Element Pack Lite Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/bdthemes-element-pack-lite\/assets\/icon-128x128.gif?rev=2820864\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/bdthemes-element-pack-lite\" target=\"_blank\" rel=\"noopener\">\n                        Element Pack Elementor Addons (Header Footer, Free Template Library, Grid, Carousel, Table, Parallax Animation, Register Form, Twitter Grid)                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Element Pack Elementor Addons is a versatile plugin offering header\/footer options, a free template library, grid, carousel, table, parallax animation, registration form, and Twitter grid functionalities.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2606<\/span> (149)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 90000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.3.2            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 7.4.0            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[rooten_custom_template]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Bdthemes Element Pack Lite [rooten_custom_template] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The rooten_custom_template shortcode is a feature of the bdthemes-element-pack-lite plugin. It allows you to display content created with Elementor on your WordPress site. \n\n\n\nThis shortcode retrieves and displays a specific Elementor template based on its ID. If the ID is not specified or invalid, it returns an empty string.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[rooten_custom_template]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible rooten_custom_template shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>id<\/code> &#8211; A unique number that identifies the specific template<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A simple shortcode to display a custom template by referencing its ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[rooten_custom_template id=1 \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Example 1 &#8211; Using the shortcode with an invalid ID. In this case, the shortcode will return an empty string because the ID does not exist.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[rooten_custom_template id=9999 \/]<\/code><\/pre>\n\n\n<p>Example 2 &#8211; Using the shortcode without any ID. Similar to the previous example, this will also return an empty string because no ID is provided.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[rooten_custom_template \/]<\/code><\/pre>\n\n\n<p>Please note that the &#8216;rooten_custom_template&#8217; shortcode has been designed to work with only one attribute, &#8216;id&#8217;. Adding more attributes will not have any effect on its functionality. Always ensure that the ID you provide corresponds to a valid custom template for the shortcode to work as expected.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[rooten_custom_template]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('rooten_custom_template', array($this, 'shortcode_template'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction shortcode_template($atts) {\n\n        $atts = shortcode_atts(\n            array(\n                &#039;id&#039; =&gt; &#039;&#039;,\n            ),\n            $atts,\n            &#039;rooten_custom_template&#039;\n        );\n\n        $id = !empty($atts&#91;&#039;id&#039;]) ? intval($atts&#91;&#039;id&#039;]) : &#039;&#039;;\n\n        if ( empty($id) ) {\n            return &#039;&#039;;\n        }\n\n        \/\/ if (class_exists(&#039;\\Elementor\\Post_CSS_File&#039;)) {\n\n        \/\/ \t\/\/ Load elementor styles.\n        \/\/ \t$css_file = new \\Elementor\\Post_CSS_File($id);\n        \/\/ \t$css_file-&gt;enqueue();\n        \/\/ }\n\n        return self::$elementor_instance-&gt;frontend-&gt;get_builder_content_for_display($id);\n    }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">bdthemes-element-pack-lite\/bdthemes-element-pack-lite\/includes\/class-rooten-theme-compatibility.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Bdthemes Element Pack Lite Plugin shortcode<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Bdthemes Element Pack Lite Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Bdthemes Element Pack Lite Plugin shortcode not to show or not to work correctly. Before starting, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Element Pack Elementor Addons (Header Footer, Free Template Library, Grid, Carousel, Table, Parallax Animation, Register Form, Twitter Grid)","slug":"","version":"5.4.3","author":"<a href=\"https:\/\/bdthemes.com\/\">BdThemes<\/a>","icons":"https:\/\/ps.w.org\/bdthemes-element-pack-lite\/assets\/icon-128x128.gif?rev=2820864","plugin_tags":"{\"addons\":\"addons\",\"elementor-addon\":\"elementor addon\",\"elementor-addons\":\"elementor addons\",\"elementor-extensions\":\"elementor extensions\",\"elementor-widget\":\"elementor widget\"}","author_profile":"https:\/\/profiles.wordpress.org\/bdthemes\/","requires":"4.7.0","tested":"6.3.2","requires_php":"7.4.0","rating":94,"num_ratings":149,"active_installs":90000,"downloaded":1500530,"last_updated":"2023-10-15 4:16am GMT","added":"2019-09-19","homepage":"http:\/\/elementpack.pro\/","short_description":"Best Addon for Elementor WordPress Plugin with 70+ Most Popular Elements that need your everyday website page building.","description":"\"Element Pack Elementor Addons is a versatile plugin offering header\/footer options, a free template library, grid, carousel, table, parallax animation, registration form, and Twitter grid functionalities.\"","shortcodes":"[\"rooten_custom_template\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":587,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/445\/revisions\/587"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}