• Resolved RHCdG

    (@rhcdg)


    Hi,

    I am designing custom menus for my website. The third menu in the left hand bar, “Afzonderlijke werken” (the site is in Dutch) holds 15 parent pages each holding another 15 child pages on average, and again some 5 grandchild pages at the third level. Totalling over 200 pages this is a lot but I do need it this way because the items form a group, and I have 7 other custom menus in addition (the entire site consists of 1,000+ pages, and a weblog).

    While designing the menu, I suddenly found that there appears to be a maximum amount of pages to add to the menu because pages that I had added earlier disappear from the menu, like it’s truncated. With each newly added page, an earlier page goes.

    Does anybody know if there is such a maximum in place for custom menu items, and if yes, is there anything to do about it?

    Many thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • There is, but it’s not a WordPres setting. I’ve run into this a lot as well, so I’ve seen the issue a lot…

    What the culrpit is, is the number of POST variables that are allowed by the server. This is a problem because WordPress sends something like 11 fields for each menu item (or so I’ve read), so the standard limit of 1,000 items is reached at somewhere around 86 or 87 menu items. Everything after that is… lost.

    The way to “fix” this is to set up a custom php.ini file in the wp-admin folder. On my servers this works:

    <IfModule mod_php.c>
    
    php_value suhosin.simulation 1
    
    php_value suhosin.memory_limit 128M
    php_value suhosin.post.max_vars 5000
    php_value suhosin.request.max_vars 5000
    
    </IfModule>
    
    max_input_vars = 5000

    That raises the max values to 5,000 so you can get more in there.

    In your situation I’d suggest looking at something else though, if you have osme programming knowledge. If I was in that situation and I needed menus so big I’d look at setting up my own custom menu walker class/classes so that I could set up the menus the way that I want them to work. There’s a whole lot of ways that you could do it, so it would be up to you to figure out what would work for you best in that situation.

    Thread Starter RHCdG

    (@rhcdg)

    Dear catacaustic,
    Thank you very much for your fine and elaborate answer!
    Best regards,
    Rutger

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Any limit to number of items in custom menu?’ is closed to new replies.