Shortcodes in Category Description for slider

  • Bob
    Bob
    Newbie 41 points
    August 14, 2016 at 8:46 pm

    I’ve used vslider for many of my slides. I’d like the shortcode to work in the category description.

    For instance I have categories; city1, city2 etc.

    I’d like to have the shortcode in city1 be a slider for that city, and a different shortcode that pulls a different slider for that city.

    Unfortunately I can’t seem to make shortcodes work inside the category descruption.

  • Jean-Francois
    Jean-Francois
    Newbie 53 points
    August 14, 2016 at 8:53 pm

    I didn’t try but I think you need to add this to your _functions.php

    add_filter( 'term_description', 'shortcode_unautop');
    add_filter( 'term_description', 'do_shortcode' );
  • Bob
    Bob
    Newbie 41 points
    August 14, 2016 at 10:56 pm

    Thanks Jean_Francois. I did try that and I just get a blank screen.

    Bob

Viewing 3 posts - 1 through 3 (of 3 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes