Category (under Custom Taxonomy) no longer showing on homepage

Hi guys, sorry to hit you with loads of posts just before the weekend but I'd rather work though all this stuff as quickly as possible :slight_smile:

OK as crazy as it sounds I swear I just had a category disappear on my directory homepage, I haven't added any plugins since it was last 'seen' so I'm not sure what might be causing it

I saw a couple of other people on the forum mentioned a similar issue (eg https://premium.wpmudev.org/forums/topic/listings-no-longer-showing-on-home-page-tags-are-removed) but there didn't seem to really be a fix (in that link the category just came back) I just wondered if you could give me any idea on what might have caused it and how I could bring it back?

In my situation the category is Shops which should appear under 'Dubai Mall' (please see the image showing where it used to be!)

It's still there in the back-end and you can go to it directly via this link on the front-end:

http://dubaimalls.esanctuary.webfactional.com/dubai-mall/shops

I've had it there all day, it's just not showing as a link on the homepage (http://dubaimalls.esanctuary.webfactional.com/) anymore

Any ideas you can give would be much appreciated

Cheers

Nick

  • esanctuary
    • Flash Drive

    Hi David,

    Just been playing around with this a bit more, in case it helps I noticed that it seemed to be connected to whether Shops (under Dubai Mall) had a sub-category, see these two screenshots I put together which shows what I mean (though other categories, eg Movies, don't seem to be affected by the sub-category thing)

    (I also tried adding custom posts under each category (and deleting and re-adding the categories several times with the same results unfortunately)

    Is that anymore help?

    I will also now try creating a totally new taxonomy as you suggest and seeing if that fixes it, my main worry is though that, unlike most of the other stuff I've been asking you guys about (mainly a lack of knowledge usually on my part), this seems like a possible bug. My worry then is I end up creating hundreds or thousands of records for the real site and everything being fine to start with and then hitting the same thing some way further down the line. At that point having to delete and re-add taxonomies would not be so easy and potentially embarrassing if there are real customers using it!

    Anyway I'll try a couple of other things and let you know how I get on

    Thanks for your help as always

    Nick

  • esanctuary
    • Flash Drive

    OK, I digged into this a bit more (rocking Saturday night I'm having here as you can see :slight_smile:

    And I can now reproduce the error so hopefully this sheds more light on it, basically it all depends how many categories/sub-categories there are under my 'Dubai Mall' taxonomy

    With 10 categories or less the homepage correctly shows the four 'top' categories I want (how I would expect it to behave)

    Once you start adding more sub-categories though (the categories number was constant at '4' during this whole test) different things start to happen

    11 (4 categories + 7 sub-categories under Dubai Mall)... only 3 categories show under Dubai Mall on the homepage
    12... only 2 categories show under Dubai Mall on the homepage
    13... only 1 category shows
    14... five sub-categories show(!)

    The images should illustrate that a little better, hopefully this is of some help now it's reproducible?

    If there's a small tweak to the code or similar you can suggest that would fix this that would help a lot, but I'm not an expert at stuff so perhaps it's more complicated than that!

    To solve this another way, I'm actually thinking of 'statically' coding the whole homepage (as I'm not even sure how often these categories would change), so could you point to where I might be able to do that in the code, I don't mind doing it manually with html/CSS etc, I'm just not sure which file I should be editing? (I realise this doesn't 'solve' the first issue, but it's a workaround that might be good enough for me for this project in the meantime) If there's no quick fix to the 'bug' any help you can give me on statically coding it instead would be much appreciated!

    Thanks again

    Nick

  • DavidM
    • DEV MAN’s Mascot

    Hi Nick, sorry for the delay. I wasn't able to replicate this on a test site and I can't see why the taxonomies would be missing. I'll ask one of the developers to take a look into this.

    I'd just like to check one other item as well since you were making customizations in your other thread. Are you using the theme as it is by default during all this?

  • Ivan
    • The Incredible Code Injector

    Hi esanctuary,

    This is related to the taxonomy output. You have to change the "number" argument in wp_list_categories(). It is in the theme includes files in theme-functions.php. Check the http://codex.wordpress.org/Template_Tags/wp_list_categories here for more info on all arguments.

    I am doing a major update to the Directory plugin which will be out very soon so if you want you can wait a little for the new version.

    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.