WordPress.org

Ready to get started?Download WordPress

Forums

WP Nivo Slider
Multiple Instances Possible? (5 posts)

  1. transformer617
    Member
    Posted 3 years ago #

    Hi,
    Can the Nivo Slider appear on more than one page and pull images from different categories? I want to use it to display product images from different product lines on separate pages, ie product a on one page; product b on another; product c on yet another.

    Is this possible? Thanks
    Bill

    http://wordpress.org/extend/plugins/wp-nivo-slider/

  2. lcrafael
    Member
    Plugin Author

    Posted 3 years ago #

    Unfortunately not yet. Who knows I do this for a next version. But I do not know if the idea of the plugin.

    --
    Rafael Cirolini
    [sig moderated as per the Forum Rules]

  3. Andy
    Member
    Posted 2 years ago #

    +1 for Multiple Instances

  4. sparklabs
    Member
    Posted 2 years ago #

    Hi.
    We modified the plugin to support multiple instances.

    open /wp-content/plugins/wp-nivo-slider/wp-nivo-slider.php

    STEP 1
    find line: function show_nivo_slider() {
    replace: function show_nivo_slider($number_category) {

    to accept a parameter to this function that is the category you want to show.

    STEP 2
    find line:

    $category = get_option('wpns_category');
    $n_slices = get_option('wpns_slices');

    replace:

    $category = $number_category;
    	$contpost=0;
    
    	//get count post - sparklabs.com.mx
    	query_posts( 'cat=$category' );
    
    	if( have_posts() ) : while( have_posts() ) : the_post();
    		$contpost++;
    	endwhile;
    	endif;
    
    	$n_slices = $contpost;

    get number of slides in the category

    STEP 3
    In the template where you want to display the slider placed this line.
    <?php if ( function_exists('show_nivo_slider') ) { show_nivo_slider(4); } ?>
    http://www.sparklabs.com.mx/wp-admin/edit-tags.php?action=edit&taxonomy=category&amp;tag_ID=4&post_type=post.
    the TAG_ID is the number.

    greetings! and any matter please contact us.

    Spark Labs.
    http://www.sparklabs.com.mx

  5. AidenVennis
    Member
    Posted 2 years ago #

    Hi Spark Labs,

    I tried your changes above, but it doesn't seem to work. I tried adding 3 boxes to a page, and the first one loads but the second and third are stuck in the loading screen (round loading screen keeps turning).

    Thanks by the way for being so supportive! Plugin works nice, simple and easy. First plugin that worked out of the box in a template for me :)

    Kind regards,
    Nick

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic