Skip to main contentSkip to footer

Removing Relevanssi from the quick edit

Relevanssi Premium adds Relevanssi tools to post edit pages and in the quick edit box. If you want to disable these, there’s an option to hide both. But what if you want to keep the Relevanssi tools on the edit pages, but want to remove them from the quick edit?

The option removes both, but there’s a solution. The quick edit features are added with the WordPress filter hook quick_edit_custom_box and can be removed by unhooking the Relevanssi function from that hook. You can do this with this little snippet:

add_action( 'init', function() {
	remove_filter( 'quick_edit_custom_box', 'relevanssi_quick_edit_custom_box' );
}, 11);

Add this to your site, and the quick edit features will be gone.

It’s important to wrap the remove_filter() in the init action, because otherwise this will have no effect if you put this code in your theme. Theme code runs before plugin code, so you’d first remove the filter and then Relevanssi would add it. Relevanssi adds the filter in an init action on priority 10, so the priority 11 on init action is the first possible time to remove it.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Disabling Relevanssi
If you need to disable Relevanssi, for example for a particular template, all you need to do is to unhook…
Indexing embedded PDFs for the parent post

…post_id FROM $wpdb->postmeta WHERE meta_key = ‘_wp_attached_file’ AND meta_value = %s )”, $pdf_url ) ); $content .= $pdf_content; } return $content; } DearFlip DearFlip uses a shortcode that points to the flipbook post, which has a custom field with the PDF URL: add_filter( ‘relevanssi_content_to_index’, ‘rlv_dearflip_content’, 10, 2 ); function rlv_dearflip_content(…

Related Posts:

Currently there are no related posts available.

Comment Section:

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed