[Question] Duplicating "Section" shortcode ?
Hello,
I'm having trouble to create a new item wrapper like "section shortcode" for the page builder. So my question is : is that only possible ? Because I duplicated it, renamed everything and as a result : no error but that doesn't works. As I know it's quite a special shortcode so I'm just wondering.
Thanks,
2F
So it's not possible ? If so, no problem I'll find another way :) 2F
Hello, It should be possible. I can't say for sure because I didn't made it.
Hi,
I can confirm I've duplicated the section shortcode into a plugin which I'm using in a theme that's in development and it's working fine.
@martinburdon can you offer an example how you did it?
@dmbostan sure thing
I have my shortcodes extracted out into a plugin as they're plugin territory, in my plugin I have the following folder structure for shortcodes which you need to follow for Unyson.
extensions/shortcodes/shortcodes
Then in that folder I have my shortcodes, for the section shortcode I simply took the section shortcode folder from the Unyson plugin and added it, then modified it to suit my needs. You can find it in the Unyson plugin at the following path:
unyson/framework/extensions/shortcodes/shortcodes/section.
Here is a screenshot of my plugin folder structure for clarity:

Hope that helps
@martinburdon do you have the Save template option in your custom section? It seems to be missing for duplicated sections. The default, however, is ok.
Hey @dmbostan,
It looks like it's not there for me - I'm assuming this feature was added after I had duplicated the section shortcode and overridden it. I guess it could be added in by duplicating the latest version of the section shortcode as in my comment above then adding your overwrites in again.
Hope that helps
I'm not sure, but I remember the templates for sections being hardcoded for the original section shortcode only. I can be wrong, though.