AndrewTraub
Expert
Super Volunteer
Member Likes (0)
Hello,
Is it possible to disable a listing in the directory without deleting it?
I have gone to the Content Types->Taxonomies section and set the "public" type to "false" which removes the taxonomy from the listings area in the dashboard, but it still shows up on the home page. Is it possible to disable the taxonomy without deleting it?
Thanks,
Andrew
Responses (3)
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hello Andrew,
As far as the individual listings are concerned, you could always change their status to draft or review, though I'm guessing you meant the taxonomies?
And regarding taxonomies, did you want to hide them conditionally like when there's no published listings using those taxonomies or were you looking to simply not display a particular taxonomy?
Cheers,
David
Member (joined October 2010) Likes (0)
Not display the taxonomy on the home page.
Andrew
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hi Andrew,
I'm very sorry for the delay on this one! Had to slim down some databases and my Directory test site was among them but it's back up and I've just tested the following to be sure.
To exclude taxonomies from the homepage listings you'll want to be working in the following file:
directory/themes/default/includes/functions/theme-functions.php
And on line 56 you'll see the following:
if ( is_object_in_taxonomy('directory_listing', $taxonomy ) ) {You can change that as follows, inserting your own in place of 'mytaxonomy':
if ( is_object_in_taxonomy('directory_listing', $taxonomy ) && $taxonomy != 'mytaxonomy') {You can as add many of those && conditionals as you like so that you could exclude whatever taxonomies you want from the listing.
Thanks,
David
WordPress Questions?
We've got answers!
Find out more »