• Resolved teeboy4real

    (@teeboy4real)


    Hello,

    Please can you make another DTD snippet that works for only the Category taxonomy and not Location taxonomy.

    Recents WP Adverts update has a better interface for Location taxonomy so I need DTD snippet to work for only Category taxonomy.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    you can disable the DTD for the advert_location field in the [adverts_add] shortcode or the Classifieds / Publish block by adding the code below in your theme functions.php file

    
    add_filter( "dependant_taxonomy_dropdown_get", function( $dtd ) {
        unset( $dtd["advert"]["adverts_location"] );
        return $dtd;
    } );
    

    or just open the file dependant-taxonomy-dropdown.php and remove from it the line

    
    "adverts_location" => array( "taxonomy" => "advert_location", "rename_to" => "advert_location" )
    
    Thread Starter teeboy4real

    (@teeboy4real)

    Hello Greg

    I used the filter code but the dtd did not deactivate for location in the advert search form.
    It only worked in the advert add form

    Thread Starter teeboy4real

    (@teeboy4real)

    I figured this out by adding below

    unset( $dtd["search"]["location"] );

    Thanks this is now resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DTD For Category only’ is closed to new replies.