I can not add more than 15 menu items. Why?
-
I am using the WP3, put the following code in functions.php:
if (function_exists('add_theme_support')) { add_theme_support('nav-menus'); } add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'menu-cabecalho' => __('Menu Cabecalho'), 'menu-categorias' => __('Menu Categorias'), 'menu-rodape' => __('Menu Rodape') ) ); }
And in their places where I want to have the menu in my theme, I put the following code:
<?php wp_nav_menu( array( 'theme_location' => 'menu-cabecalho', 'menu_class' => 'nav clearfix' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'menu-categorias', 'menu_class' => 'superfish nav clearfix' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'menu-rodape', 'menu_class' => 'superfish nav clearfix' ) ); ?>
But do not believe the problem is there because the administration panel, which sets up the menu, under Appearance, I can not add more than 15 items in any of the menus.
In fact, even get by, but when you click save, they are the first 15 items and the others disappear.
I tried to do the same in the default theme and the problem persists
Anyone idea what can be?
-
no idea what’s the problem?
Can’t replicate that problem on 3.0 with the default theme(twentyten).
Created a test menu, added 20 items then got bored so stopped, but no problem viewing all 20 items. Don’t use the menus myself, so can’t comment further, but i’m not able to replicate your issue of only seeing 15 items.
It appears to be a server config issue:
http://core.trac.wordpress.org/ticket/14134Thanks, t31os_. I’ll try to shoot my screen to show the problem.
esmi, I found the link interesting, as it also did not find such problems, as well as the author of the ticket. However, the solution apparently solved his problem, not solved my problem. Changed the settings on my server for max_vars to 300, did not work, I put 400 and also gave up nothing and increase to not harm the server.
the characteristics of suhosin.request.max_vars are:
*
Type: Integer
*
Default: 200Defines the maximum number of variables That May Be registered through the COOKIE, the URL or through a POST request. This
Also setting is an upper limit for the variable origin specific configuration directives.________________________________
The correct would be the worpress work within those parameters, because increasing this value too, is to let the server extremely slow.
Able to accomplish it without problem.
Php was configured to use 256mb of memory and suhosin with the following configuration:
[suhosin] suhosin.request.max_value_length = 325000 suhosin.post.max_value_length = 325000 suhosin.request.max_vars = 500 suhosin.post.max_vars = 500
For me, this is not a comfortable setting, but it is functional. I’ll be looking into whether this will decrease drastically the performance of my server, otherwise fail to use this function from WP3 and will use the previous system.
After doing work, I activated the plugins that I use and I discovered that the plugin Global Translator also affects this new menu system WP3 therefore recommend disabling this plugin who are having trouble with the new menu system WP3
Luckily this is one of the top 3 pages of google search “wordpress menu limit”, so I quickly found a solution. I wrote a letter to my ISP to set the limit to 5000 and now it’s solved. I just asked them to set the following two values in PHP.
suhosin.post.max_vars = 5000 suhosin.request.max_vars = 5000
But I think WordPress with it’s millions of downloads should really think about a different structure for the menu data, as I think not all users go as far as this and really look after the problem. And something as popular as WordPress really shouldn’t work in a “ask you ISP to set these values for you” way!
- The topic ‘I can not add more than 15 menu items. Why?’ is closed to new replies.