kkrafts 0 Report post Posted January 27, 2011 I would like to place a narrow (obviously) carousel in one of my sidebars. About a month ago, Bryan Hadaway answered a similar question. He suggested placing the following php code into an advanced text widget: <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?> <!-- Thumbnails --> <?php foreach ( $images as $image ) : ?> <li id="ngg-image-<?php echo $image->pid ?>" class="list-item ngg-gallery-thumbnail-box" <?php echo $image->style ?> > imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>"/> <?php } ?> <?php endforeach; ?> <?php endif; ?> I did that - but it doesn't seem to be working. Is there something else that needs to be done? I will have to mess with making it narrow - but first I need to get it to show up! My site is http://www.pathologystudent.com/ if it matters... Share this post Link to post Share on other sites
Kate 3 Report post Posted January 27, 2011 Hey Kristine - Haven't tried the code myself, so can't say for sure if it would work. But, are you putting this into a PHP enabled text widget? (You would need a separate plugin for that...) Also, have you see this: http://wordpress.org/extend/plugins/nextgen-gallery-sidebar-widget/ Share this post Link to post Share on other sites
makeylon 0 Report post Posted January 28, 2011 As Kate said, you need to have the ability to use php in widgets/posts/pages, etc in order to use php code in them. Personally, I use a plugin called Exec-PHP. That allows me to add php code Pretty much anywhere. Share this post Link to post Share on other sites
bryan-hadaway 3 Report post Posted January 28, 2011 Exec-PHP is good, used it before. But, I wouldn't recommend it in this case, might be overkill. Use this plugin: http://wordpress.org/extend/plugins/php-code-widget/ And in Appearance > Widgets you need to actually drag it into the sidebar and then place the code inside. Thanks, Bryan Share this post Link to post Share on other sites
ysdt 0 Report post Posted February 1, 2011 Hello, I also tried using the aforementioned PHP code with the php code widget (that Bryan suggested) and the carousel isn't showing up. But, (and I don't know if I should start another thread for this) is it possible to have the carousel align vertically and link to blog posts in a sidebar? I may be asking too much. I tried to find a plugin that would do this. Found some vertical carousels, but I can't seem to link them to the blog post entries. Thanks everyone. Take care, Samar Share this post Link to post Share on other sites
cmunns 16 Report post Posted February 1, 2011 There is a way to configure the carousel vertically, but it would require quite a bit of HTML customization in the template. I would really consider a plugin to make your life easy: http://wordpress.org/extend/plugins/smooth-slider (try this) Share this post Link to post Share on other sites
ysdt 0 Report post Posted February 1, 2011 Thank you so much Adam. For some reason when I had downloaded that plugin before (this is a while back) I couldn't get it to work. Now it is working beautifully. Thank you again. Share this post Link to post Share on other sites