SVG Featured image not shown in twitter

Twitter has some limitations upon file extensions. I see that you’re passing on some variables within your meta tag. https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html URL of image to use in the card. Images must be less than 5MB in size. JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. … Read more

Change Featured Image / Thumbnail CMS Description

The following will add help text to the initial “Set featured image” text. Add the following to your theme’s functions.php. Replace “Your custom text goes here” with your help text. Tested and works. function custom_featured_image_text( $content ) { return ‘<p>’ . __(‘Your custom text goes here’) . ‘</p>’ . $content; } add_filter( ‘admin_post_thumbnail_html’, ‘custom_featured_image_text’ ); … Read more

Add Featured image column into wordpress admin on pages AND posts

The reason you’re getting an error is because you’ve got multiple functions with the same name. You have two functions called add_img_column() and two called manage_img_column(). You can’t have two functions with the same name in PHP. You don’t even need two functions though. You can hook the same function into multiple hooks. So this … Read more

Admin Notices don’t display on the admin screen for certain post

I found the answer. Notices in the Block Editor would require JavaScript code. ( function( wp ) { wp.data.dispatch(‘core/notices’).createNotice( ‘error’, // Can be one of: success, info, warning, error. ‘Error Message.’, // Text string to display. { isDismissible: true, // Whether the user can dismiss the notice. // Any actions the user can perform. actions: … Read more

Add post-thumbnail after first paragraph including the caption

Something like this should work add_filter( ‘the_content’, ‘insert_featured_image’, 20 ); function insert_featured_image( $content ) { global $post; if ( has_post_thumbnail($post->ID) ) { $thumbnail_caption = get_the_post_thumbnail_caption( $post ); if ( $thumbnail_caption ) $caption = ‘<span class=”image-caption”>’ . $thumbnail_caption . ‘</span>’; else $caption = ”; // You can set this to whatever you want. $img = ‘<p>’ … Read more

How to change post featured image using a custom field of category?

You could filter the the_post_thumbnail() function, which will dynamically show the assigned category image across all your custom post type, rather than using acf_save_post to save the category image in the post featured image meta field. By filtering the the_post_thumbnail() for your specific post type, this means if you change the image on category in … Read more