• Resolved teeboy4real

    (@teeboy4real)


    Hello,

    I am using the a custom template file for
    taxonomy-advert_location.php
    taxonomy-advert_type.php

    and the code inside is

    <?php 
        global $wp_query;
        remove_filter("the_content", "adverts_the_content");
        echo shortcode_adverts_list(array());
        ?>

    The issue now is that clicking the advert location taxonomy does not query the location and advert type. Instead of ads related to location displaying all ads are displaying.

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

    (@gwin)

    Hi,
    the last line in your code should be

    
    echo shortcode_adverts_list(array(
      "tax__advert_location" => $wp_query->get_queried_object_id()
    ));
    

    this will filter the ads by a current taxonomy, for the taxonomy-advert_type.php template file change the “tax__advert_location” to “tax__advert_type”

    Thread Starter teeboy4real

    (@teeboy4real)

    Thanks this is now resolved

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to query taxonomies’ is closed to new replies.