WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] Ordering Products Alphabetically When Displayed (3 posts)

  1. fcarlini
    Member
    Posted 10 months ago #

    Is there a way to order products alphabetically when they're displayed?

    https://wordpress.org/plugins/woocommerce/

  2. fcarlini
    Member
    Posted 10 months ago #

    Solved this myself. If someone needs the answer here it is below

    /**
    * This code orders the catalog by either title or date
    **/
    add_filter('woocommerce_default_catalog_orderby', 'my_custom_default_catalog_orderby');
    
    function my_custom_default_catalog_orderby() {
    return 'title'; // Can also use title and date
    }
  3. fcarlini
    Member
    Posted 10 months ago #

    This is resolved. Code is above.

Reply

You must log in to post.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic