WordPress.org

Ready to get started?Download WordPress

Forums

Easy Digital Downloads
[resolved] Reverse the order of songs listed? (9 posts)

  1. stitchyrocks
    Member
    Posted 2 years ago #

    Hi,

    This is probably really simple, but on the purchase page (the list of all the products), how do I reverse the order of the products listed. Right now, they're listed in chronological order (so the ones that I uploaded last are shown first). How can I reverse it?

    Thanks!

    http://wordpress.org/extend/plugins/easy-digital-downloads/

  2. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Are you comfortable with a tiny bit of PHP? I can give you a quick method for doing it.

  3. stitchyrocks
    Member
    Posted 2 years ago #

    Yes, I think I can handle a tiny bit of php. It would be nice if you could teach me how to do it :) Thanks!

  4. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Can you update to the latest version (I pushed it out 5 minutes ago)? I added an update that will make reversing the order much simpler than before.

  5. stitchyrocks
    Member
    Posted 2 years ago #

    Updated to the new version! Looked around but couldn't find that option. I'm sorry. Could you point it out to me? I'm not the brightest cookie!

  6. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    It's not a visual option, just an option in the code. Place the following into your theme's functions.php or a custom plugin:

    function pw_edd_reverse_cart( $contents ) {
    	return array_reverse( $contents );
    }
    add_filter('edd_cart_contents', 'pw_edd_reverse_cart');
  7. stitchyrocks
    Member
    Posted 2 years ago #

    Added the snippet to the functions.php file for my theme but not seeing the change.
    http://www.billcurreri.com/purchase/

    (Brother is supposed to be shown first).

    Am I doing something wrong?

  8. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Ohhh, sorry, we are talking about different things.

    I thought you meant you wanted to reverse the order of items in the shopping cart, but you're referring to changing the order of the downloads grid.

    If you go and install the Post Types Order, you will be able to completely control the order / position of each download.

  9. stitchyrocks
    Member
    Posted 2 years ago #

    Sweet. Perfect! Thank you, and sorry for the misunderstanding!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.