lenzsolution
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Display new taxonomySince the beginning i had url´s for categories like – /adverts/?advert-category=catname – is that the right path?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Display new taxonomyHi,
thanks for the quick support! Everything works fine, but after adding
add_filter( "adverts_list_query", function( $args ) { global $wp_query; if(!is_array($args["tax_query"])) { $args["tax_query"] = array(); } $args["tax_query"][] = array( 'taxonomy' => 'advert-example', 'field' => 'term_id', 'terms' => $wp_query->get_queried_object_id(), ); return $args; });to the functions.php only the new taxonomy is shown and every item in each advert_category is missing now.
- This reply was modified 6 years, 11 months ago by lenzsolution.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Display new taxonomyNow i´ve used the following snippet (https://github.com/simpliko/wpadverts-snippets/blob/master/custom-taxonomies/custom-taxonomies.php). Now it displays the new “advert_example” categories on the single page. But after click on the link it shows the standart wordpress blog list template and not the wp advert list style ( URL=/advert-example/categoryname/ – URL for advert-categeries=/adverts/?advert-category=categoryname). And how to display the new categories in the widget area?
Thanks!