Below, you’ll find a detailed guide on how to add the Shortcode Addons Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Shortcode Addons Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Shortcode Addons Plugin and the shortcodes it provides:
"Shortcode Addons is a versatile WordPress plugin, offering compatibility with Visual Composer, Divi, Beaver Builder, and Elementor Extension. It provides a range of addons to enhance your site's functionality."
- [oxi_addons]
Shortcode Addons [oxi_addons] Shortcode
The Oxi Addons shortcode is a powerful tool in PHP. It allows users to add specific features or styles to their website with ease. This shortcode extracts the ‘id’ attribute from the given array and uses it to create a new shortcode. The new shortcode then calls the ‘oxi_addons’ method from the Shortcode class, passing the ‘id’ as a parameter. This enables users to implement predefined styles or features on their website by simply using the shortcode [oxi_addons] followed by the desired ‘id’.
Shortcode: [oxi_addons]
Parameters
Here is a list of all possible oxi_addons shortcode parameters and attributes:
id
– It’s the specific number that identifies each shortcode.
Examples and Usage
Basic example – The shortcode ‘oxi_addons’ allows you to display a specific layout by referencing the ID of the layout.
[oxi_addons id=1 /]
Advanced examples
With the ‘oxi_addons’ shortcode, you can also combine multiple layout IDs to create a unique page layout. This is done by separating the IDs with a comma. For example:
[oxi_addons id="1,2,3" /]
Additionally, you may also specify multiple layout IDs and assign different attributes to each layout. This can be achieved by using the ‘id’ attribute multiple times within the shortcode. Here’s how:
[oxi_addons id=1 id=2 id=3 /]
Remember, the ‘oxi_addons’ shortcode is a powerful tool that allows you to customize your WordPress site’s layout to suit your specific needs. With its flexible and easy-to-use structure, you can create unique and dynamic page layouts with ease.
PHP Function Code
In case you have difficulties debugging what causing issues with [oxi_addons]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode('oxi_addons', [$this, 'oxi_addons_shortcode']);
Shortcode PHP function:
function oxi_addons_shortcode($atts)
{
extract(shortcode_atts(array('id' => ' ',), $atts));
$styleid = (int) $atts['id'];
$shortcode = new \SHORTCODE_ADDONS\Layouts\Shortcode();
return $shortcode->oxi_addons($styleid);
}
Code file location:
shortcode-addons/shortcode-addons/Core/Bootstrap.php
Conclusion
Now that you’ve learned how to embed the Shortcode Addons Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.
Leave a Reply