Forum Replies Created

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

    (@vbarberini)

    Gee strange… sounds like it might be an issue with my ISP. I’ll check, and thanks for your quick reply!

    Thread Starter vbarberini

    (@vbarberini)

    RESOLVED this through an amendment to the filter search_autocomplete_modify_title:

    add_filter( ‘search_autocomplete_modify_title’, ‘saModifyTitle’, 10, 2 );

    function saModifyTitle( $title, $object ) {
    $result = $title;
    global $wpdb;
    $result = $wpdb->get_results ( ‘
    SELECT *
    FROM wp_term_taxonomy
    WHERE term_id = ‘.$object[id].’
    ‘ );
    $the_parent = $result[0]->parent;

    if ( $object[‘type’] === ‘taxonomy’ ) {
    //$parents = get_post_ancestors( $object[‘id’] );
    if ( $the_parent = 0 ) {
    $result = get_the_title( end( $the_parent ) ) . ‘ – ‘ . $title;
    }else{
    $result = $title ;
    }
    }

    return $result;
    }

Viewing 2 replies - 1 through 2 (of 2 total)