How to customize the Filter search on the Posts Lists(edit.php)

This customize is how to simply Filter search on the Posts list.

 

Customize for Filter search

Customize for Filter search

 

 

Step1 Add hook to the only Posts list.

 

Please add below code to functions.php of your theme.

 

This will continue to perform the customize in it custom_load_edit function.

 

 

Step2 Remove the All Dates select box.

 

All dates filter search is not very necessary. So it will remove.

 

All Dates

All Dates

 

Please add code to custom_load_edit function.

 

And please add code to functions.php

 

 

It looks like this.

 

Remove the All Dates

Remove the All Dates

 

 

Step2 Remove the All categories.

 

All categories filter does not have disable filter like the All dates. So it need to hide in the CSS.

Please add code to custom_load_edit function.

 

And please add code to functions.php.

 

It looks like this.

 

Remove the All Categories

Remove the All Categories

 

 

Step3 Remove the Filter search button.

 

Filter search button also need to hidden in the CSS.

Please add code to under the #posts-filter #cat of custom_admin_print_styles function.

 

It looks like this.

 

Remove the Filter search button

Remove the Filter search button

 

This is complete! 🙂

 

 

If you use to WordPress SEO plugin(WordPress SEO by Yoast).

 

Show the select box of All SEO scores filter automatic when activate WordPress SEO plugin.

 

All SEO Scores

All SEO Scores

 

This will hide to it item.

Please add code to custom_load_edit function.

 

 

 

If you want show the custom fields filter.

 

Try to Filter to look for the same price.

Please add code to custom_load_edit function.

 

 

And please add code to functions.php.

 

 

It looks like this.

 

Add Prices Filter

Add Prices Filter

 

It is looks complete. However this Filter does not working yet.

So please add code to custom_load_edit function.

 

 

And please add code to functions.php.

 

It looks like this.

 

Filter search for Custom FIelds

Filter search for Custom FIelds

 

 

Full code is here.

 

 

 

 

 

Leave a Reply

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


*