Support » Plugin: WP Nivo Slider » [Plugin: WP Nivo Slider] Add images without post

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey Tigron did you ever get an answer to this or figure it out? I’m trying to do the same thing and don’t want the images to go to any post

    Me too.

    tigron

    (@tigron)

    I still haven’t figured this out. Has anyone else got any further ?

    Smos

    (@smos)

    I think I found a solution. Around every image in the nivo slider there’s a link to the post. I simply removed that link so you can’t click on the images in the slider.

    In the plugin editor, go to the code files of the WP Nivo Slider plugin.
    There you have to open the wp-nivo-slider.php file. Look for the opening tag of <div id="slider">.
    A couple of lines below that you have the following code:

    <?php query_posts( 'cat='.$category.'&posts_per_page=$n_slices' ); if( have_posts() ) : while( have_posts() ) : the_post(); ?>
    	<?php if(has_post_thumbnail()) : ?>
    	<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    		<?php the_post_thumbnail(); ?>
    	</a>
    	<?php endif ?>
    	<?php endwhile; endif;?>
    	<?php wp_reset_query();?>

    You have to remove the <a> tag from the code so your link is gone.
    Then you should have something like this:

    <?php query_posts( 'cat='.$category.'&posts_per_page=$n_slices' ); if( have_posts() ) : while( have_posts() ) : the_post(); ?>
    	<?php if(has_post_thumbnail()) : ?>
    	<?php the_post_thumbnail(); ?>
    	<?php endif ?>
    	<?php endwhile; endif;?>
    	<?php wp_reset_query();?>

    It worked for me, I hope it does for you too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Nivo Slider] Add images without post’ is closed to new replies.