Step 3: Add the shortcode to WPCode
The next step is to install WPCode, which is a snippet plugin.
Technically, you don't need to use a plug-in to insert guatemala phone number custom code snippets into your theme files. But we do this to be on the safe side, as pasting code into a theme file can cause unexpected errors.
Note: You can also use the free version of WPCode to get started, but you'll need the premium WPCode plugin to insert the code snippets after the HTML elements in this tutorial.
First, install the WordPress plugin in the admin area. After launching the plug-in, navigate to Code Snippets + New Snippet, select Add your custom code (New Snippet), and click the + Add Custom Snippet button.
New custom code snippets in WPCode
Now let's give the new snippet a name. It can be something as simple as the "Hero Banner Shortcode".
Next, change the code type to "PHP Snippet".
Added hero banner shortcode to WPCode
In the code preview box, paste the following code snippet:
1
echo do_shortcode('[hbupro_banner id
One-click use in WordPress
Make sure [hbupro_banner id="XXX"] is edited using the previous hero banner shortcode.
Then scroll down to the "Input Panel" section.
We've found WPCode to be very useful for managing custom code snippets without breaking the site.
-
- Posts: 65
- Joined: Mon Dec 23, 2024 2:26 pm