5 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in Mongolia
sodbileg
says

How can I add my own shortcode ( e.g. Testimonials ) like built-in elements on Visual Composer? For example, the built-in Accordion element has “Add accordion section” link below. I want my added shortcode be like that.

I tried extending The WPBakery_VC_Accordion and WPBakery_VC_Accordion_Tab classes with no luck.

581 posts PremiumLayers.com
  • Has referred 10+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
PremiumLayers
says

Tried contacting support, asked them to quote me basically with ANY price as I needed such an example really urgent and the one provided in the documentation does not work at all. It took me around 1 week of going back and forth with the support staff, could never even get to the actual plugin author to ask my questions. This is a pity as it’s a really good plugin, wish support was a little better than this.

16 posts
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has referred 10+ members
  • Has been part of the Envato Community for over 1 year
+1 more
ThemeDsgn
says

Hi, is there any tutorials for creating this custom element? I need to create custom tabs element, tried extending the built-in tabs, but no luck. Thanks in advance.

962 posts Rock 'N' Roll
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 2 years
  • Won a Most Wanted contest
+4 more
LSVRthemes
says

Check out this. It works for me.

1755 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Had an item that was trending
  • Became a Top 20 Author of the Month
  • Achieved the monthly Community Superstar Award
+9 more
tommusrhodus
says

Hey everyone :)

Here’s some gists of my own blocks:

1. This example is just really simple, the main shortcode is simple enough to not need any options or globals applied, it simply wraps the innner shortcodes.

https://gist.github.com/tommusrhodus/0e9932214e8bf81ad1b9

2. This is a much more complex block, both the wrapper and nested shortcodes have options applied to them, furthermore they require globals to collect additional data and render it outside of the $content.

https://gist.github.com/tommusrhodus/698122d1fe22a2489bae

Hope that helps even a bit :)

581 posts PremiumLayers.com
  • Has referred 10+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
PremiumLayers
says

Tom, you are the man! Really appreciate you sharing the code, it’s a life-saver. Haven’t tried it in action yet, just one question – does it also solve the 2 icons appearing in the visual composer shortcodes list – one for the wrapper and for the inner shortcode? I had such issue previously and while I could figure out how to make the nested shortcodes work, that part was never solved.

1755 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Had an item that was trending
  • Became a Top 20 Author of the Month
  • Achieved the monthly Community Superstar Award
+9 more
tommusrhodus
says

does it also solve the 2 icons appearing in the visual composer shortcodes list

Yeah, my Gists above cover that, only the wrapper element is selectable from the main area, and then only the content element is selectable when you click on the wrapper.

On this Gist: https://gist.github.com/tommusrhodus/698122d1fe22a2489bae

See line 167 (as_parent) and 198 (as_child).

Cheers!

16 posts
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has referred 10+ members
  • Has been part of the Envato Community for over 1 year
+1 more
ThemeDsgn
says

Awesome, thank you very much everyone. :)

581 posts PremiumLayers.com
  • Has referred 10+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
PremiumLayers
says


does it also solve the 2 icons appearing in the visual composer shortcodes list

Yeah, my Gists above cover that, only the wrapper element is selectable from the main area, and then only the content element is selectable when you click on the wrapper.

On this Gist: https://gist.github.com/tommusrhodus/698122d1fe22a2489bae

See line 167 (as_parent) and 198 (as_child).

Cheers!

Thanks so much, really appreciate it!

1755 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Had an item that was trending
  • Became a Top 20 Author of the Month
  • Achieved the monthly Community Superstar Award
+9 more
tommusrhodus
says

Thanks so much, really appreciate it!

No problem!

by
by
by
by
by
by