Writing an ordering query (2 posts)

  1. helper_query
    Posted 3 years ago #

    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 :)

  2. helper_query
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic