Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thanks a lot it is working
    you can use this code in wp_config.php to run polylang shortcut
    function polylang_shortcode($atts, $content = null)
    {
    if (empty($content))
    return ”;
    extract( shortcode_atts( array(‘lang’ => ”), $atts ) );
    if (empty($lang))
    return “<h3>You must specify ‘lang’ using shortcode: polylang</h3>”;

    return ($lang == pll_current_language()) ? $content : ”;
    }
    add_shortcode(‘is_language’, ‘polylang_shortcode’);

Viewing 1 replies (of 1 total)