Shortcode are not working in Option tree textarea

admin2025-06-04  2

I am using option tree. In textarea, i place shortcode

[layerslider id="1"]

its not working, i also found same post replied by plugin author allow shortcodes in textarea in option tree

applied the

do_shortcode('[layerslider]');

still no solution

I am using option tree. In textarea, i place shortcode

[layerslider id="1"]

its not working, i also found same post replied by plugin author allow shortcodes in textarea in option tree

applied the

do_shortcode('[layerslider]');

still no solution

Share Improve this question edited Sep 27, 2013 at 17:55 Alizain Prasla asked Sep 11, 2013 at 19:31 Alizain PraslaAlizain Prasla 1318 bronze badges 2
  • wordpress/support/topic/… – Ismail Farooq Commented Feb 3, 2017 at 7:52
  • @IsmailFarooq I have got the answer mentioned below. – Alizain Prasla Commented Feb 3, 2017 at 7:56
Add a comment  | 

2 Answers 2

Reset to default 1

Got the solution.

you can use shortcode e.g. [layerslider id="1"] in textarea/textbox and call it by the name to the textarea/textbox use in option tree function files

e.g.

get_option_tree( 'textboxname');

It will do.

do_shortcode(get_option_tree( 'textboxname' ));

The code will get the value whatever it is form optiontree textbox and execute the shortcode manager on it. If that string contains any shortcode it will be repalced by the output.

Thanks

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748971138a315267.html

最新回复(0)