Support » Fixing WordPress » Writing an ordering query

  • Hello, i need help in writing such query.
    i want to order post in different categories differently.
    let’s say i have category1, all the post in it have numeric value tags. all i need is to change ordering of post in this category from DATE based to TAG Based ASC or DESC. but in category2 i want posts ordering to be default by date 🙂 is it possible if yes, can u tell me how to do this?
    Thank you!
    i found plugin Post Sorter which was great for me, which was adding textboxes to posts. i could write in numeric values and it was sorting it asc or desc. but its out of date and not working anymore. i need something like that Post sroter which allows you to sort posts in differnt categories differently. query based on tags will be great 🙂

Viewing 1 replies (of 1 total)
  • this is the query what wrote in mysql.
    i need to make default order by this but in exact category…
    SELECT t2g0g19_terms.name FROM t2g0g19_term_taxonomy, t2g0g19_terms WHERE (taxonomy = ‘post_tag’ AND t2g0g19_terms.term_id = t2g0g19_term_taxonomy.term_id) ORDER BY t2g0g19_terms.name ASC

Viewing 1 replies (of 1 total)
  • The topic ‘Writing an ordering query’ is closed to new replies.