• I have enjoyed using Grid Products to add products for a client’s website. We have 550 products, and 38 categories. I have created pages to display the products using the shortcode. The products display on the page by order in which the product was added. I would like better organization of this page and have the products show up alphabetically by title.

    Can this be done with an edit to the shortcode?

    Or would one edit, wp-includes/query.php ? This codex article seems helpful, but I am wondering if anyone has solved this question already and can offer some guidance for editing this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just figured this out (I don’t think the plugin is being supported, so you’ll have to hack it yourself). Basically, I did this:

    Plugins => Editor, then select ‘grid Products’ from the dropdown on the right-hand side.

    Then click on grid-products.php to edit the code for the plugin.

    Find the section where there’s a comment that says:

    // stuff that loads when the shortcode is called goes here

    and edit the orderby field. Change it from

    ‘orderby’ => ‘menu_order ID’,
    to
    ‘orderby’ => ‘title’,

    Then save by clicking ‘Update file’. If you’re running any caches, you’ll need to delete the cache, but once you’ve done that, your products will be sorted by their title, alphabetically.

    Thread Starter StaciMarie13

    (@stacimarie13)

    Thank you so much for your reply webreaper! That worked and got my products listed alphabetically. Thanks again!

    where do i find the shortcode to add to page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to edit shortcode to display products alphabetically by title?’ is closed to new replies.