I am not sure why you want to do this, but you can accomplish it with preg_replace().
Try adding this to your theme’s functions.php:
add_filter( 'admin_post_thumbnail_html', 'remove_featured_image_link' );
function remove_featured_image_link($content) {
$content_edit = preg_replace('/<a .*?class="(.*?thickbox.*?)">(.*?)<\/a>/','<div>$2</div>',$content);
return $content_edit;
}
Related Posts:
- Add ‘if exists’ to filter
- How to removes all instances of thumbnails displayed in my theme?
- Override has_post_thumbnail function
- How to apply filter on get_the_post_thumbnail()
- Distinguish between page and post in function
- WordPress set featured image to first image of the post
- Set post featured image to author image
- Print url to default featured image
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- changing size image within the content
- can’t output gray scaled image I’ve created using add_image_size
- Wrapping Featured Image on Add/Edit Page in div?
- add_filter with specific thumb names
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- Changing JPEG compression depending on image size
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- What do add_filters() and apply_filter() do?
- add_filter to youtube embeds?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- How can I customize the wp_list_categories
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Filter keywords from search query
- Add classname to the_category() function?
- Filter the URL of next_posts_link & previous_posts_link
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- How To Get User Data in Callback Function for pre_user_nicename?
- What’s the best way to split admin-only functionality in the theme’s functions.php file?
- Gutenberg disable the “block” tab in right sidebar
- Editing
- the_content filter – checking the post
- add_filter to apply_filters that exists within class
- Which built-in WordPress files are safe to edit?
- How do I target a single page to modify the comment form of only that page?
- Adding a title prefix with the the_title filter
- Contact Form 7 filter similar to preprocess_comment [closed]
- How to modify an existing meta description?
- Adding TinyMCE buttons without removing plugin buttons?
- Can the wordpress color palettes by changed through Javascript?
- Filter on the_content doesn’t update the content being searched via register_rest_route
- Where to add_filter in theme functions.php?
- tag removed not using a filter
- How to customize the “Insert/edit link” popup box?
- How to filter backend post list showing only posts having a shortcode
- WordPress Image update filter
- How do I override the_excerpt so that it will display full content?
- Why does WordPress strip custom HTML that are form elements and theme SVG icons?
- Get current user data
- How can you wrap add_filter with a if is_home() statement?
- How to add attributes to WordPress Admin Sub Menu List Items
- How to combine multiple body classes
- How to replace username with email address in users table
- How to write a filter to remove a form field (WordPress) [closed]
- Why doesn’t this function work when I know that the IP Address is “true”?
- why require – does not load filter
- term_link filter rewrite link only applying half of condition?
- How to change dynamically page title according to variable data?
- Map plugin with proximity search compatible with Buddypress
- Create a pre-filtered version of the Media Library
- What is the action hook to use if you want to capture the new password during password change?
- Get_template_part inside filter?
- How to filter Sidebar Content
- Which Filter Do I Use To Modify The Subject Of The Retrieve Password Notification Email?
- Making an add_filter() call from within an add_filter() call
- automatic title through filter
- Finding actual functions added to hooks and filters
- Buddypress Filter Multiple Activities [closed]
- How do I check if I can use the allowed_block_types filter?
- Setting the page title in a plugin, but not outside my plugin
- oembed_dataparse filter not running at all for standard YouTube embed
- Action for opening attachment or manipulating all attachment links
- Filter wp_mail based on content type
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- mu-plugins body_class filter not working
- How to apply a filter to everything?
- WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page
- Conditionally (cpt) filter previous and next_post_link
- Post filter Month dropdown at front-end like wordpress backend
- shortcode function outputs multiple anchor tags
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Show child theme for users on specific IP
- wp.getPosts with status = ‘trash’ using node.js
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- How can I display wp_link_pages before a shortcode, if it is used, or display after content?
- confusion with add_filter
- post->post_content filter
- How to change this WP logo and posts url in block editor?
- Limit total tags in the_content