$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Shortcode are not working in Option tree textarea|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Shortcode are not working in Option tree textarea

matteradmin9PV0评论

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

Post a comment

comment list (0)

  1. No comments so far