WordPress.org

Forums

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

  1. fcarlini
    Member
    Posted 1 year ago #

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

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

  2. fcarlini
    Member
    Posted 1 year 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 1 year ago #

    This is resolved. Code is above.

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic