3 posts
  • Has been part of the Envato Community for over 2 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.

558 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
+3 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.

13 posts
  • Has collected 1+ items on Envato Market
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has referred 10+ members
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.

824 posts Rock 'N' Roll
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Located in Slovakia
  • Has been part of the Envato Community for over 2 years
+4 more
LubosVolovar
says

Check out this. It works for me.

1674 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Achieved the monthly Community Superstar Award
  • Made it to the Authors' Hall of Fame
+6 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 :)

558 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
+3 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.

1674 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Achieved the monthly Community Superstar Award
  • Made it to the Authors' Hall of Fame
+6 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!

13 posts
  • Has collected 1+ items on Envato Market
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has referred 10+ members
ThemeDsgn
says

Awesome, thank you very much everyone. :)

558 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
+3 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!

1674 posts How's the surf doing?
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Achieved the monthly Community Superstar Award
  • Made it to the Authors' Hall of Fame
+6 more
tommusrhodus
says

Thanks so much, really appreciate it!

No problem!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by