如果超过90个菜单项的限制,则WordPress会删除我的菜单项- [英] Wordpress removes my menu items if above the Limit of 90 menu items -

查看:73
本文介绍了如果超过90个菜单项的限制,则WordPress会删除我的菜单项-的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在菜单中添加更多项目

I want to add more item in my menu

我有一个菜单,其中至少包含90个wordPress菜单(管理)项,我想添加更多菜单,但发现其他菜单会自动删除.

I've a menu that contains at least 90 item in wordPress menus (administration), I want to add more and I found that others are removed automatically.

有解决方案吗?

推荐答案

在大多数情况下(但不是100%),这是PHP的限制,而不是WP.

In most likelihood ( but not 100% ) , This is a PHP limit, not WP.

您可以通过查看php.ini来验证/配置它.

You can verify / configure it by looking at your php.ini.

基本上,问题出在php.ini中的max_input_vars变量.

Basically, the problem is max_input_vars variable in php.ini.

变量在PHP版本5.3.9中引入,并且默认值1000.

This variable was introduced in PHP version 5.3.9 and has the default value of 1000.

您应该尝试将其增加到1500甚至2000.

You should try to increase it to 1500 or even 2000.

正如您在上面的php doc链接中看到的那样,这基本上是分别对$_GET$_POST$_COOKIE超全局变量应用的限制.

As you can see in the above php doc link, This is basically a limit applied to $_GET, $_POST and $_COOKIE superglobal separately.

每次在wordPress中单击save menu按钮时,您基本上都会发送大量由该公式估算的POST变量:

Every time you click the save menu button in wordPress, you basically sending a lot of POST variables estimated by this formula :

"Total POST variables" = 11 * "number of menu items" + 9

因此您可以轻松地理解,添加90菜单项实际上是在发送

So you can easily understand that when you add 90 menu items you are actually sending

( 11*90 )  + 9 = 999

太接近您的默认限制1000了,任何其他POST项目都会给该限制增加小费..

that is too close to your default limit of 1000 and any further POST item will tip the limit ..

类似地,当您通过POST Ajax(通过拖放添加菜单)将其添加时,公式有些不同-但概念是相同的..

Similarly , When you add it via POST Ajax ( add menu by drag and drop ) the formula is a bit different - but the concept is the same ..

"Total POST variables" = 10 * "number of menu items" + 3

因此,只需计算您的限制-并相应地增加(使用比率和一点安全裕度即可.仅放置10,0000可能会起作用,但这不是很合理..)

So just calculate your limit - and increase accordingly ( with ratio and a bit of safety margin.. just putting 10,0000 might work but it is not very logic .. )

可以在此处此处

进行一些Google搜索时,还会在插件帮助您进行通知时你达到了那个极限.

A bit of googling will also find a plugin to help you with a notification when you arrive to that limit.

这篇关于如果超过90个菜单项的限制,则WordPress会删除我的菜单项-的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆