• Having setup our site approximately 6 months ago we started adding content and everything has worked perfectly until now – we utilise Exec-PHP to execute a very small amount of PHP code on a couple of pages but this does not appear to be the issue, as the same code still works on the other pages, jut not on this single page.

    Currently we have over 1000 categories and this will continue to grow until we have approximately 4500 categories due to the nature of the content we are indexing.

    The reason i am giving this information is i believe the issue might be linked to the number of categories we are trying to list – but whether it is an issue with Exec-PHP or an issue with WordPress is still to be determined?

    Currently we use this code to list the categories in a PAGE using the aforementioned plugin:

    <?php wp_list_categories('orderby=name&show_count=1&use_desc_for_title=0&title_li=&exclude=30,650,718,1157'); ?>

    We use the exact same code on multiple pages just the include/exclude integers are different so the code itself is not the issue as it still works on the other pages.

    Also, having done extensive testing on this code we have found that once we are trying to list ‘too many’ categories it just stops listing ANY categories. For example:

    1. Exclude our largest category and the code works.
    2. Stop excluding that category and it stops working again
    3. Start excluding the smallest categories working our way up and after 4 or 5 categories the code starts working again, displaying every category that is not excluded (even the originally excluded large category)
    * Rules out the issue of a corrupt database or section of the database i believe?

    So does anybody have any idea if the wp_list_categories function has a limit on the number of categories it can process/deal with? And if so where is this function found and how can we change it? I’ve read on other forum topics and Google searches of LIMIT’s to do with categories but that was related to the admin WRITE panel etc. rather than on the actual site.

    Or could it be an issue with the Exec-PHP plugin not processing information correctly or having its own internal limits on the number of categories it is able to process?

    If the latter, does anybody know of another PHP execution plugin that works with current version of WordPress?

    I am by no means a PHP expert although i do a lot of HTML/CSS programming so would gladly welcome your thoughts and suggestions on the issue.

    Warm Regards,
    Ewan

Viewing 6 replies - 1 through 6 (of 6 total)
  • This is probably not the answer you’re looking for, but might be a way to test your category limits question with wp_list_categories and Exec-PHP…

    Try activating the List Category Posts plugin here https://www.ads-software.com/extend/plugins/list-category-posts/ and see if you get the same limits as you’re currently seeing.

    You can see the list of parameters here: https://foro.picandocodigo.net/viewtopic.php?f=28&t=251

    At least it might lead you to the next troubleshooting step?

    Thread Starter burnthelies

    (@burnthelies)

    Thanks for the suggestion, have since tried it using the mentioned plugin and was unable to get things to work properly – ironically it actually makes the error WORSE.

    Have done a bit more testing and the page in question (if it were working correctly) should display 27 primary categories with any number of sub-categories under each, and it seems once the categories being displayed drops below approximately 300 the page starts working again.

    Also the text i have put on the page to advise visitors of an issue with the list changes colour from black (when the page isnt working – this is WRONG) to the appropriate red when it is working (which is the correct text colour on the site).

    Although im guessing this is probably more as a result of the embedded code on the page not executing correctly as if i look at the source code on the faulty page it fails to display ANY code once it has reached the point of executing the wp_list_categories function.

    So i can only assume it is somehow linked to a limit in that function? Anybody have any other insight? Or a solution?

    As always, thanks in advance.

    Don’t rule out a plugin conflict. The reason I say this is your description of color changes on the text.

    Can you share a link to the page?

    Thread Starter burnthelies

    (@burnthelies)

    The current working page can be viewed at

    https://www.shadowlyrics.com/bands

    This is the modified page that i have an extra category excluded on at the moment to make it work.

    https://www.shadowlyrics.com/bands/test

    This is the standard page we have been using for the past 6 months until now, as you can see it doesnt display anything after the point where wp_list_categories executes

    Thread Starter burnthelies

    (@burnthelies)

    Managed to track down the issue, so thank you very much for your words of wisdom, disabled the handful of plugins we have running on the site and re-activated them one at a time.

    Eventually worked out that it is Simple Tags plugin that was causing the issue – and seeing as we dont really use it very often it is easier just to get rid of it.

    Thanks again, warm regards,
    Ewan

    Thanks for the update and very glad it was an easy fix for you:)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_list_categories – Limit on number of categories ?’ is closed to new replies.