The WordPress submit web page (the place you write your posts) can get a bit crowded for some folks’s style.
Code for Eradicating Meta Packing containers
Take away Meta Packing containers from Pages
For instance, check out this screenshot of the part beneath the write/edit display screen. It’s jam-packed with several types of meta bins.
In fact, if you wish to take away a number of that messiness, you may pull down the Display Choices panel on the high of the web page and uncheck no matter you want.
Whereas that works, you might need a scenario the place you need all of these meta bins eliminated mechanically. Possibly you’re coping with purchasers or website customers who don’t must be taught yet one more little one thing they must do. Or perhaps you don’t need these bins out there to them regardless.
Whereas there are a selection of plugins that may do that for you, on this submit, we’re going to point out you the way you are able to do that by inserting some code in your features.php file.
Code for Eradicating Meta Packing containers
The code beneath has feedback in it, so you may add or take away no matter you want. For instance, should you’d prefer to preserve the excerpts meta field, then you must be capable to simply determine the road that applies to excerpts and take that line out.
Place the next code in your features file (Look > Editor > Theme Capabilities – features.php).
Putting that code ought to take away all of the meta bins beneath the submit editor and provide you with a pleasant, clear look. The yellow define is the place all of the meta bins was once.
In fact, these bins below the submit editor aren’t the one meta bins on that display screen. There are additionally the extra essential meta bins to the correct of the editor.
There’s code to take away these too, however we’ll separate it out right here as a result of it’s much less possible that individuals would need these bins eliminated. For those who do, nonetheless, you’d merely want to repeat and paste whichever line you’d like into the strains of code above. (The one meta field that many might wish to do away with right here is the Codecs field.)
*Word: the code for eradicating the Featured Picture meta field doesn’t appear to work (and hasn’t for some time for some purpose), and so we haven’t included it right here.
Take away Meta Packing containers from Pages
The identical may be finished for Pages, in fact. Right here’s the code for that.
Do not forget that whenever you put this code in your features.php file, it’s theme-specific. So should you change themes, you’ll must do it for that features file too.
If you want to make your personal easy plugin for this code, you may discover ways to do this right here.
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!