snipt

Ctrl+h for KB shortcuts

Text only

Utiliser les shortcodes dans les widgets

1
2
3
if ( !is_admin() ) {
    add_filter('widget_text', 'do_shortcode', 11);
}
https://snipt.net/embed/5c047ed47135dd6e32e3f627be073e49/
/raw/5c047ed47135dd6e32e3f627be073e49/
5c047ed47135dd6e32e3f627be073e49
text
Text only
3
2019-08-17T21:15:00
True
False
False
Nov 13, 2012 at 04:29 PM
/api/public/snipt/49218/
utiliser-les-shortcodes-dans-les-widgets
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>if ( !is_admin() ) { </span><span id="L-2"><a name="L-2"></a> add_filter(&#39;widget_text&#39;, &#39;do_shortcode&#39;, 11); </span><span id="L-3"><a name="L-3"></a>} </span></pre></div> </td></tr></table>
php, wordpress