Support » Plugin: vSlider Multi Image Slider for WordPress » [Plugin: vSlider Multi Image Slider for WordPress] How to make it show in category header !?!?

  • Resolved candy2012

    (@candy2012)


    Great plugin, unfortunately not much to find about HOW to properly use it.

    There is that option to have a slider swho in the category … all nice, only that HOW on Earth can I make it show in that category ?!?!

    To be more clear, I want to use the slider in the header of some categories, which code should I insert in header.php in order to make the slider show there !??

    There is really NO explanation as of how to include this in template to show for those categories.

    Hope someone can help

    Thanks!

    http://wordpress.org/extend/plugins/vslider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • hehe, I am a genius I guess 🙂

    EUREKA! This is IT :

    Include the category ID in the name of your category-specific slider.
    I called the sliders “cat1”, “cat7”, “cat45” etc. (where 1, 7, 45 are the category IDs).

    Now add this to your category header (I advise you to have a separate header for categories):

    <?php if(function_exists('vslider'))
    {
     foreach(get_the_category() as $category)
    { $thecat = "cat" . $category->cat_ID;
    }
    	vslider($thecat);
    }
    
    ?>

    That was the trick, now you can have one different slider in each category 🙂

    Say thanks 🙂

    PS: sorry for the double post earlier, was unfortunately not possible to delete 🙁

    Plugin Author Mr. Vibe

    (@wpthemes)

    great!

    Updated vslider 4.2 checkit out folks!

    Its responsive, thumbnails enabled, html captions,

    vestmar

    (@vestmar)

    Candy, you ARE a genious! 🙂

    QUESTION: what if I use vslider in posts not cats; how would that change the function in terms of syntax? (newbie here:) )

    I case you’re asking why I use vslider in posts, actualy, I use wp only for websites, so no need to have multiple posts in one cat, so I forward the cat url to the first post in that cat. In that specific post I am using vslider and I want of course, a different slider in each post (1 different post per 1 different cat).

    Thanks,

    Puiu D.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: vSlider Multi Image Slider for WordPress] How to make it show in category header !?!?’ is closed to new replies.