Skip Navigation

[Resolved] selectbox on custom post archive page

This support ticket is created 8 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 8 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#350347

Bao

My site: hidden link

Hi,

I want to make a selectbox on custom post archive page to choose sorting custom posts by date, price, custom field, ect. Do you have any solution?

Thanks

#350432

Dear Bao,

The query of wordpress archive page is defined by wordpress self, there isn't such a order by feature when you create a archive view.

You can try create a select menu to passing URL parameters to the archive page, and use wordpress action hook pre_get_posts to modify the query of archive page:
http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

Hope it help

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.