-
-
I’m trying to create a custom shortcode or custom widget in de functions.php child of my child theme. But this is not working.
I have this basic code:
// Add Shortcode function custom_shortcode() { // Code echo 'test'; } add_shortcode( 'lotcategories', 'custom_shortcode' );
But when I add the shortcode [lotcategories] to a page only the tag is showing
Can you help me out with this?
-
Hello,
If you want to create new shortcodes you must edit the files:
specular\includes\core\shortcodes\mce\editor_plugin.js
specular\includes\register\register_shortcodes.php
specular\includes\core\shortcodes\sc – add another .js file for your shortcode.Best regards!
-
How can i do this within my child theme? Otherwhise I have to copy the shortcode codes with every update
-
Hello,
Yes, you can do it from child theme. Just add the code above into your child theme’s functions.php file.
Best regards!
-
You must be logged in to reply to this topic.