WordPress: how to increase the limit of 30 custom fields

 Posted on 28 April 2012

More people use WordPress as a blogging software but not just for that reason, but also for general websites and even online stores or management of small-scale projects. In many cases,customization is very demanding and long ago started to get to talk about working with custom fields, taxonomies, input formats, post formats, types of inputs (class post), types input (post types), etc.

custom fields WordPress: how to increase the limit of 30 custom fields

WordPress sets a limit of 30 custom fields to be display in the editor. We can use more, but we must create them by hand and do not appear in the editor by default. Even if we use a plugin that creates custom fields it will not appear more than thirty.

To increase this limit today I bring you this hook.

We just have to add these lines of code to our functions.php file

/ * Increase the limit of custom fields * /
add_filter ('postmeta_form_limit', 'customfield_limit_increase');
customfield_limit_increase function ($ limit) {
$ limit = 100;
return $ limit;
}

This will provide you up to 100 custom fields to use for your posts and pages.

Thanks to WordPress support for the code.

Share with your friends!
Published by admin in WordPress

There are No comments yet, be the first!

Write a comment

YES you can use HTML code in comments.
NO you cannot leave spam or insult anyone.

Your coment will be moderated the first time. Later on it will not be moderated as long as you use the same contact info.