Portfolio Category Page not in Alphabetical Order

Hello
I am using the portfolio function to show an artist’s work. To do that, I have created 3 pages and 2 categories. One page displays all of his artwork. One page shows the “Available Artwork” category and the last page shows the “Sold Artwork” category. We would like to have all of these pages show the artwork in alphabetical order.

In order to create the pages, I created a new page, selected the “Portfolio” template, went to the Portfolio options, found the “Category Select” section and selected “All Categories” for the All Pieces page, “Available” for the Available page and “Sold” for the Sold page.

The All Artwork page displays just as we would like. Every piece in alphabetical order. However, both the Available and Sold pages are not in alphabetical order. In fact, I think they are in reverse alphabetical order.

I checked the categories to see if they might be displaying in chronological order by any chance and that does not line up either.

Do you know why this might be happening?

Please let me know
Dylan

Hey Dylan,

I have logged in and investigated your issue. It turns out that the portfolio items were displaying in Descending order because of your arguments in the modified WP_query. You have added this:

$args = array(
      'post_type'      => 'x-portfolio',
      'posts_per_page' => $count,
      'paged'          => $paged,
      'orderby'  => 'title',
      'order'    => 'DESC',
      'tax_query'      => array(
        array(
          'taxonomy' => 'portfolio-category',
          'field'    => 'term_id',
          'terms'    => $filters
        )
      )
    );

I went ahead and changed the order to ASC or ascending order so that the portfolio items will be in alphabetical order.

Please check your portfolio pages now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.