Skip to main content
4 events
when toggle format what by license comment
Mar 25, 2023 at 23:31 comment added Tom J Nowell 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?
Mar 25, 2023 at 19:36 comment added JasCav @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.
Mar 25, 2023 at 19:19 comment added Tom J Nowell 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()
Mar 25, 2023 at 18:31 history asked JasCav CC BY-SA 4.0