Title: Code for rotating image widget
Last modified: August 19, 2016

---

# Code for rotating image widget

 *  Resolved [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/)
 * I am using a widget called “rotating image widget” for a slideshow in my sidebar.
   It pulls images from recent blog posts. I would like to change the source to 
   pull images from a specified folder that contains images not necessarily used
   in blog posts. I can not find the file to edit and get this done. Thanks for 
   any help.
 * Or is there a better widget to do this? a simple slideshow will do.
 * Thanks.

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528836)
 * does anybody know where this code might be located? I know its simple but i’m
   still trying to get better at WP. Thanks for the help.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528838)
 * You could start by providing a link to the widget in question… 🙂
 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528864)
 * Sorry, here is the link, [http://wordpress.org/extend/plugins/rotating-image-widget/](http://wordpress.org/extend/plugins/rotating-image-widget/)
 * I guess a better question would be, what would you use to insert a slideshow 
   into a sidebar? Nothing fancy just slideshow of some pics from a specified folder.
 * Thanks.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528866)
 * Probably a standalone image rotation script, but if you like this particular 
   script i think it could be modified to use a folder instead, it’s a matter of
   switching a query for posts to a piece of code that reads a folder..
 * There’s tons of image rotation scripts around though, usually for doing just 
   as you say above, select images from a folder. If the slider code is independant
   from the plugin then sure a standalone script would be fine, otherwise the plugin
   route might be easier…
 * Well whatever you decide, if you need help, feel free to ask… 🙂
 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528867)
 * Might you point me to a stand alone rotation script example? 🙂 I assume you 
   mean HTML script that can be put into a standard widget? Thanks for the response,
   i get better everyday at this WP stuff. Thanks. I think the plugin i am using
   is probably not the best for me.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528869)
 * You’d still need PHP, so i’d probably suggest you register your image rotation
   script as a widget, you’d then just add the widget to your sidebar via Admin 
   > Themes > Widgets, like any other widget.
 * For a script, there’s lots to choose from.
    [http://www.google.co.uk/search?q=php+images+from+folder](http://www.google.co.uk/search?q=php+images+from+folder)
 * Aim for something small, complex scripts are unnecessary for grabbing images 
   from a folder. To illustrate keeping it simple, grabbing a list of files in a
   directory…
    [http://www.w3schools.com/php/func_directory_scandir.asp](http://www.w3schools.com/php/func_directory_scandir.asp)
 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528870)
 * This seems amazingly simple, [http://analysisandreview.com/wordpress/image-rotation-script-for-wordpress/](http://analysisandreview.com/wordpress/image-rotation-script-for-wordpress/),
   even has a PHP file yet i try and it won’t work. Thanks for the links, i will
   continue to try, i thought this might be simple ha. The link above sounds perfect
   but just can’t get it to work.
 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528889)
 * One more question, how do i reference the php file from the text widget? For 
   instance i can create a php file using this, [http://www.phpsnaps.com/snaps/view/php-image-slideshow-auto/](http://www.phpsnaps.com/snaps/view/php-image-slideshow-auto/),
   i then upload it but how do i tell wordpress where i want the slideshow to appear?
   Thanks for the help.
 *  Thread Starter [jwillua](https://wordpress.org/support/users/jwillua/)
 * (@jwillua)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528893)
 * basically, how do you do step #6? Thanks
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1528912)
 * Managed to spare a few moments to try a quick mod to the plugin..
    [http://wordpress.pastebin.com/g90AhVVv](http://wordpress.pastebin.com/g90AhVVv)
 * All you’d need do is open `wp-content/plugins/rotating-image-widget/includes/
   core.php` and replace the get_images() function with the one provided above..
 * Setup to look in the theme’s folder for a directory called images, but you can
   see the part i’ve modified, also supports the uploads directory (the commented
   out parts).
 * Regarding the code above, you’d still need to register the code inside a widget,
   and i’d guess it’ll be a little more tricky then my mod above.
 *  [rodwreck](https://wordpress.org/support/users/rodwreck/)
 * (@rodwreck)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1529094)
 * > Managed to spare a few moments to try a quick mod to the plugin..
   >  [http://wordpress.pastebin.com/g90AhVVv](http://wordpress.pastebin.com/g90AhVVv)
   > All you’d need do is open wp-content/plugins/rotating-image-widget/includes/
   > core.php and replace the get_images() function with the one provided above..
   > Setup to look in the theme’s folder for a directory called images, but you 
   > can see the part i’ve modified, also supports the uploads directory (the commented
   > out parts).
   > Regarding the code above, you’d still need to register the code inside a widget,
   > and i’d guess it’ll be a little more tricky then my mod above.
 * Hey man this works perfectly thanks t31os_
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1529096)
 * You’re welcome.. 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Code for rotating image widget’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 3 participants
 * Last reply from: [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/code-for-rotating-image-widget/#post-1529096)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
