Home > CMS Tutorial > WordPress > body text

Teach you how to modify the number of custom columns displayed in WordPress

藏色散人
Release: 2020-11-19 15:30:01
forward
2373 people have browsed it

The following WordPress Tutorial column will introduce to you how to modify the number of custom columns displayed in WordPress. I hope it will be helpful to you. Friends in need help!

Teach you how to modify the number of custom columns displayed in WordPress

Sometimes we will select the added custom column name in the Add Custom Column panel, but WordPress only displays the first 30 custom column names in alphabetical order by default , the excess will not be displayed. When there are too many custom columns added, the custom columns you want to add will not be found in the selection box. You can only add them manually, which is very inconvenient. You can increase the number of displays through the following code.

Add the following code to the current theme function template functions.php.

add_filter( 'postmeta_form_limit' , 'customfield_limit_increase' );
function customfield_limit_increase( $limit ) {
$limit = 100;
return $limit;
}
Copy after login

The number 100 is the displayed number and can be adjusted appropriately.

The above is the detailed content of Teach you how to modify the number of custom columns displayed in WordPress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:zmingcx.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!