ThemeShaper Forums » Thematic

[closed]

Nivo Slider Plugin & Thematic weirdness

(11 posts)
  • Started 13 years ago by fundamental
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. fundamental
    Member

    With the usual "I am a complete rookie" caveats...

    I am trying to use the Nivo slider plugin on my first child theme. Have it installed etc. My theme has 2 menus, one at the top above the branding for pages & and one below the branding for categories. I am inserting the slider div into the header like so.

    function top_box() { ?>
    <?php if ( function_exists('show_nivo_slider') ) { show_nivo_slider(); } ?>
    <?php }
    add_action('thematic_header','top_box',6);

    I've set the slider to load a category called "featured". The Slider appears, loads the slides fine. The issue is it messes up the posts and nav so ONLY the category "featured" posts show up on the blog. All other posts disappear.

    Any ideas anyone? I am going to post this on the Nivo forums as well.

    Posted 13 years ago #
  2. Danieliser
    Member

    why not just remove all the <?php and ?>

    whether it fixes the problem or not idk but should be like this

    function top_box() {
       if ( function_exists('show_nivo_slider') ) { show_nivo_slider(); }
    }
    add_action('thematic_header','top_box',6);

    also try checking out the code at http://wizardinternetsolutions.com/wordpress/thematic/thematic-header-image-way/. Inside the span you could add your function like this.

    // Add Header Image // Add Header Image
    function thematic_logo_image() {
     echo '<span id="nivo-slider">';
     if ( function_exists('show_nivo_slider') ) { show_nivo_slider(); }
     echo '</span>';
    }
    add_action('thematic_header','thematic_logo_image',6);
    Posted 13 years ago #
  3. Vasudeva Adiga
    Member

    You may have to run this after the slider:

    <?php wp_reset_query(); ?>

    Posted 13 years ago #
  4. fundamental
    Member

    Thanks for the responses, but unfortunately none of these had any effect. I am moving on to another slider for the moment.

    Posted 13 years ago #
  5. Danieliser
    Member

    i use vslider by vibethemes.com and have no issues. works great out of the box. i am currently using it in my new theme for my site. you can check it out at

    sandbox.wizardinternetsolutions.com and all i did to add it was this function and style it appropriately like outlined in the post i linked to above

    function thematic_logo_image_with_slider() {
    
    	echo '<a href="'.get_bloginfo('url').'" title="'.get_bloginfo('name').'" ><span id="header-image"></span></a>';
    	echo '<span id="header-slider">';
    	//if (function_exists('vSlider')) { vSlider(); }
    	echo '</span>';
    }
    
    add_action('thematic_header','thematic_logo_image_with_slider',6);
    Posted 13 years ago #
  6. fundamental
    Member

    Danieliser - thanks, finally one that works for the most part, I wish it had better transitions, but it definitely works out of the box as you said, much better than the 3 or 4 I've fooled with in the last day.

    I tried Dynamic Content Gallery, which looks great, but needs mootools, and I can't seem to get it running with JQuery properly yet.

    Posted 13 years ago #
  7. Danieliser
    Member

    i thought the transition effects look great. you can specify how many cubes wide and high the image gets broken into. set it real high for pixel effects.

    Posted 13 years ago #
  8. fundamental
    Member

    Yes they do once you fiddle with them, it works great! Thanks for the help.

    Posted 13 years ago #
  9. anybody have any code snippets on enabling Nivo w/ thematic? I am getting weird errors.

    Posted 13 years ago #
  10. joshuaiz
    Member

    Hi Helga,

    I had this working on a local test site:

    function childtheme_scripts() {?>
    
    			<!-- Include the Nivo Slider CSS file -->
    <link rel="stylesheet" href="http://vizualtest2011/wordpress/wp-content/themes/vizualchild/scripts/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
    <!-- Include the Nivo Slider JS file -->
    <script src="http://vizualtest2011/wordpress/wp-content/themes/vizualchild/scripts/nivo-slider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
    <!-- Set up the Nivo Slider -->
    <script type="text/javascript">
    jQuery(window).load(function() {
    	jQuery('#slider').nivoSlider({
            effect:'slideInLeft', //Specify sets like: 'fold,fade,sliceDown'
            slices:15,
            animSpeed:500, //Slide transition speed
            pauseTime:7000,
            startSlide:0, //Set starting Slide (0 index)
            directionNav:true, //Next & Prev
            directionNavHide:true, //Only show on hover
            controlNav:true, //1,2,3...
            controlNavThumbs:false, //Use thumbnails for Control Nav
            controlNavThumbsFromRel:false, //Use image rel for thumbs
            controlNavThumbsSearch: '.jpg', //Replace this with...
            controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
            keyboardNav:true, //Use left & right arrows
            pauseOnHover:true, //Stop animation while hovering
            manualAdvance:false, //Force manual transitions
            captionOpacity:0.8, //Universal caption opacity
            beforeChange: function(){},
            afterChange: function(){},
            slideshowEnd: function(){}, //Triggers after all slides have been shown
            lastSlide: function(){}, //Triggers when last slide is shown
            afterLoad: function(){} //Triggers when slider has loaded
        });
    });
    </script>
    <?php }
    add_action('wp_head','childtheme_scripts');
    '
    
    And then this just for the slider div:
    
    <div id="slider">
    <img src="your_url/slide1.jpg" alt="" />
    <img src="your_url/slide2.jpg" alt="" />
    <img src=""your_url/slide3.jpg" alt="" title="This is an example of a caption" />
    </div>
    
    I also had this in my functions.php:

    /*
    function my_slider() {
    if ( function_exists('show_nivo_slider') ) { show_nivo_slider();

    }
    }
    add_action('thematic_belowheader','my_slider');
    */
    `

    but it is commented out - not sure if I needed it or not and my MAMP is not running so I can't check at the moment.

    That said, I tried this on my live site and wasn't having any joy...I think the WP E-Commerce jQuery is causing many of my problems (with jPlayer, etc). According to some serious developers, the wpec code is...erm...less than optimal although I would be the first to admit user error.

    Posted 13 years ago #
  11. thanks joshuaiz. i'm not really sure what happened, but it started miraculously working yesterday. maybe it just needed a couple of days to think about what it had done. i haven't put it on a live site yet so I could just be blowing smoke.

    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.