WordPress.org

Ready to get started?Download WordPress

Forums

Faceted Search
How to sort tags in alpha ascending? (6 posts)

  1. nohler
    Member
    Posted 2 years ago #

    How do I change the php so that tags get sorted alphabetically ascending?

    http://wordpress.org/extend/plugins/faceted-search/

  2. nohler
    Member
    Posted 2 years ago #

    I added
    asort($tags);'
    just after function facetedsearch_tag_content

    That did the trick

    *** resolved ***

  3. Selvester47
    Member
    Posted 1 year ago #

    Hi

    Could you post the full line of code you changed please and in what file?

    Thanks

  4. remove
    Member
    Posted 1 year ago #

    I'm interested too, could you show us where you put this?

    Thanks.

  5. Selvester47
    Member
    Posted 1 year ago #

    Open Faceted_search.php

    Find this line:

    $tags = $wpdb->get_results('SELECT t1.name, t1.term_id, t2.parent FROM '.$wpdb->terms.' t1, '.$wpdb->term_taxonomy.' t2, '.$wpdb->term_taxonomy.' t3 WHERE t2.term_id = t1.term_id AND t3.term_id=t1.term_id AND t3.taxonomy="post_tag" ORDER BY t2.parent DESC', ARRAY_A);}

    Add

    asort($tags);

    after that.

    Save and it displays the tags in Alpha order.

  6. nohler
    Member
    Posted 1 year ago #

    Sorry your request got lost in my spam folder.

    Nice work Selvester47

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic