How to Disable Media Library Filters Added by Rank Math?

#1020408
  • Resolved Petar
    Rank Math free

    Hi there,

    How do we remove the Media Library filters added by Rank Math? We tried every possible solution provided in your documentation.

    Also, Rank Math needs to add a checkbox to the Screen Options section of the Media Library.

    Details: https://prnt.sc/yESb8lHPTUPs

    Fix appreciated! Thank you.

    Petar

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting us and bringing your concern to our attention.

    Right now, we don’t have any direct option to disable that Rank Math filter, but you can use the code on your website to hide this:

    function hide_media_attachment_seo_filter(){
    	echo '<style>
    	#media-attachment-seo-filter{
    	   display: none !important;
            }
    	</style>';
    }
    add_action('admin_head', 'hide_media_attachment_seo_filter');
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Petar
    Rank Math free

    Hi Rakibuzzaman,

    Thanks for that. Yeah, we can do that too, but it only masks the issue. The Media dashboard (filtering results) is still affected.

    Can you please ask your developers to provide a filter (snippet) that will disable that completely (natively)?

    Thank you,

    Petat

    Hello,

    We’ve shared your request with our development team for review. We can’t promise this will be implemented, but if it’s something we’re able to add in a future update, we’ll be sure to let you know.

    Don’t hesitate to get in touch with us if you have any other questions.

    Hello,

    Circling back to this situation, we have come up with a filter code to disable the media filter selector. Please refer to the code snippet below:

    add_filter( 'rank_math/admin/pro_components', function( $components ) {
    	if ( isset( $components['media_filters'] ) ) {
    		unset( $components['media_filters'] );
    	}
    
    	return $components;
    } );

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Petar
    Rank Math free

    Hi Jeremy,

    Thank you so much. Perfect. Worked like a charm.

    I would like to recommend the following before wrapping this up:

    Please incorporate your filter by way of an WORDPRESS DASHBOARD SCREEN OPTION to enable/disable Rank Math’s Media Library dropdown filter.

    Details: https://prnt.sc/tZn4b-OalVvQ

    Please, please share the above recommendation with your developers. This will help many!

    Thank you!

    Petar

    Hello,

    We will send this suggestion directly to the devs. I can’t guarantee it will be included in a short span, but I can tell you the devs will see this message and take it into consideration. Thank you for your suggestion!

    Please do not hesitate to let us know if this doesn’t help or you have any follow-up queries.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this ticket.