Below, you’ll find a detailed guide on how to add the Code Insert Manager (Q2W3 Inc Manager) 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 Code Insert Manager (Q2W3 Inc Manager) Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Code Insert Manager (Q2W3 Inc Manager) Plugin and the shortcodes it provides:
"Code Insert Manager (Q2W3 Inc Manager) is a dynamic WordPress plugin that allows users to easily insert custom code, scripts, or styles into their website without any coding knowledge."
- [include]
Code Insert Manager (Q2W3 Inc Manager) [include] Shortcode
The ‘include’ shortcode from q2w3-inc-manager plugin allows users to display specific content. When invoked, it extracts the ‘id’ attribute from the shortcode’s parameters and passes it to the ‘display_inc’ function. This function retrieves and displays the content associated with the given ‘id’.
Shortcode: [include]
Parameters
Here is a list of all possible include shortcode parameters and attributes:
id
– Unique identifier for the include object
Examples and Usage
Basic example – A simple usage of the shortcode where you only need to specify the ID of the include you want to display.
[include id=1 /]
Advanced example – In this example, we are using the shortcode to display different includes based on their IDs. If the include with the specified ID is not found, the shortcode will not display anything.
[include id=1 /]
[include id=2 /]
[include id=3 /]
Note: The ‘id’ parameter in the shortcode refers to the ID of the include you want to display. The ID can be found in the include manager in the WordPress admin area.
PHP Function Code
In case you have difficulties debugging what causing issues with [include]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode('include', array( 'q2w3_inc_manager', 'shortcode_incs' )); // shortcode init
Shortcode PHP function:
function shortcode_incs($atts, $content = null) {
$id = NULL; // Removes "!" in Zend Studio
extract( shortcode_atts( array( 'id' => null ), $atts ) );
return self::display_inc($id, q2w3_include_obj::LOC_SHORTCODE);
}
Code file location:
q2w3-inc-manager/q2w3-inc-manager/q2w3-inc-manager.php
Conclusion
Now that you’ve learned how to embed the Code Insert Manager (Q2W3 Inc Manager) 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