• Hi All,

    I am trying to create a manually search field for tags…
    It all works fine with this:

    global $wpdb;
    $search_query = $wpdb->get_results("SELECT name FROM $wpdb->terms WHERE name LIKE '%". $_POST['manual-search'] ."%' ");
    foreach ($search_query as $result) {
    	echo $result->name;
    }

    But now i want to show the results as permalinks so if you click the posts will be shown in the archive accordingly…

    Can someone help me out ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter no_ob

    (@no_ob)

    function cs_search_tags_manually() {
    global $wpdb;
    $search_query = $wpdb->get_results("SELECT name FROM $wpdb->terms WHERE name LIKE '%". $_POST['manual-search'] ."%' ");
    foreach ($search_query as $result) {
    echo '<a href="'. get_tag_link($result) .'">'. $result->name .'</a><br />';
    }
    }

    This is it till so far but further… I dont know

    Thread Starter no_ob

    (@no_ob)

    Got it ?? Thanks anyways for looking!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘permalink for tags’ is closed to new replies.