Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • when you say sort your archive pages, do you mean literal pages with page templates/page builders that show up under pages in the WP Admin screen? Or real archives that load archive templates such as archive.php etc. Also functions such as is_post_type_archive etc in a pre_get_posts should always reference the $query object, aka don't do is_single() instead do $query->is_single()
    – Tom J Nowell
    Commented Mar 25, 2023 at 19:19
  • @TomJNowell The URL is example.com/vendor-category/plumbers (as an example). So, I believe this is archive.php. I am applying a template over top of that to style it up, but that doesn't override the order. And, it's really just that is_post_type_archive is always returning false.
    – JasCav
    Commented Mar 25, 2023 at 19:36
  • do you have any custom WP_Query/get_posts/query_posts in that template you applied over the top? How did you apply the template? Is it a block template from the site editor?
    – Tom J Nowell
    Commented Mar 25, 2023 at 23:31