Title: Switch Elements Without Altering Plugin Code
Last modified: July 22, 2020

---

# Switch Elements Without Altering Plugin Code

 *  Resolved [toad78](https://wordpress.org/support/users/toad78/)
 * (@toad78)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/switch-elements-without-altering-plugin-code/)
 * I’d like to be able to switch the order of the code. I’ve attempted to use jQuery,
   but it seems to ‘loop’ and repat throughout the loop of posts in the widget output.
 * This is what it currently is:
 *     ```
       <li><a href="http://#"><img width="60" height="45" src="#" alt="#" />
       <span class="rpwwt-post-title">blah blah blah</span></a>
       <div class="rpwwt-post-categories"> |  <a href="#">News</a></div><div class="rpwwt-post-date">September 16, 2019</div>
       </li>
       ```
   
 * I want it to be this:
 *     ```
       <li><a href="http://#"><img width="60" height="45" src="#" alt="#" /></a>
       <span class="rpwwt-post-title"><a href="http://#">blah blah blah</a></span><div class="rpwwt-post-date">September 16, 2019</div>
       <div class="rpwwt-post-categories"> | <a href="#">News</a></div>
       </li>
       ```
   
 * Any way for this to be done without modifying the plugin code?

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

 *  Plugin Contributor [Martin Stehle](https://wordpress.org/support/users/hinjiriyo/)
 * (@hinjiriyo)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/switch-elements-without-altering-plugin-code/#post-13158894)
 * There is no way to alter the HTML code of the list since it is hard-wired in 
   the template file `includes/widget.php`.
    I’m thinking of this approach for your
   request: in the files `readme.txt` and `recent-posts-widget-with-thumbnails.php`
   set the value of the version number very high to prevent further overrides of
   any file changes of the plugin in the future, here from `6.7.0` to e.g. `100.0.0`.
   Then change the `includes/widget.php` as you need it. If you follow this way,
   there will be no more automatic updates of this plugin in your installation. 
   If I would add just cosmetic changes to the plugin in future, that will be of
   no interest for you. But I can not exclude major changes like adding new features,
   closing security holes or maintaining compatibility with future WordPress versions.
 *  Thread Starter [toad78](https://wordpress.org/support/users/toad78/)
 * (@toad78)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/switch-elements-without-altering-plugin-code/#post-13161073)
 * > But I can not exclude major changes like adding new features, closing security
   > holes or maintaining compatibility with future WordPress versions.
 * I completely understand. I was hoping for a more simpler version to rotate the
   content, but it looks like I’ll take your advice above.
 * Thank you, Martin, for the suggestion and your time!

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

The topic ‘Switch Elements Without Altering Plugin Code’ is closed to new replies.

 * ![](https://ps.w.org/recent-posts-widget-with-thumbnails/assets/icon-256x256.
   png?rev=2478511)
 * [Recent Posts Widget With Thumbnails](https://wordpress.org/plugins/recent-posts-widget-with-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recent-posts-widget-with-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [toad78](https://wordpress.org/support/users/toad78/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/switch-elements-without-altering-plugin-code/#post-13161073)
 * Status: resolved