WordPress admin optimization

Today in the article “Optimizing WordPress admins” I will tell, how to hide comment column in posts. I think it's useful, because usually when a new comment comes in we just go to the comments section and confirm it, or delete. To remove a comment column from the admin panel in the list of entries, you need to insert a special code in the file functions.php your topic.

If this filter bothers you, then you can always turn it off., removing code from functions.php file.

The question itself begs, how to manage columns in page list? To do this, you can use another function:

As you can see from the above code $myCustomColumns …, we add a column with a picture, attached to the record. In addition, the function contains the code for deleting the column of the author and comments.

With such a simple action, you can control the display of columns in the posts and pages of the site on WordPress.

It happens, what is needed to work create your own type and there also set up the display of columns as it was done in the example above. If you have created a new data type, then you can use the following code to change the display of the columns:

Code for working with columns of different types:

Suppose, you have a custom post type ‘a book‘, and you want to add columns publisher and author books on edit page, but delete the author of the post. Consider an example:

I found this example on official website of WordPress developers, в CODEX.

I think there is a lot of interesting material on this topic.. I think, attracted your attention, So, if you are interested in this topic, read in the code. Good luck in developing user-friendly sites and optimizing the WordPress admin.


Купить хостинг WordPress
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal