Adding a custom field or metabox to the post-thumbnail widget?

Just filter admin_post_thumbnail_html and append your checkbox HTML: add_filter( ‘admin_post_thumbnail_html’, ‘wpse_71501_thumbnail_options’ ); function wpse_71501_thumbnail_options( $html ) { return $html . <<<html <p> <label for=”big_thumbnail”> <input id=”big_thumbnail” name=”big_thumbnail” type=”checkbox” /> Use big thumbnail </label> </p> html; }

Changing playlist shortcode thumbnail sizes?

Demo Plugin – Fixed Size Here’s one suggestion as a demo plugin (PHP 5.4+): <?php /* Plugin Name: Custom Playlist Thumb Size */ namespace WPSE238646\PlaylistThumbSize; add_shortcode( ‘playlist’, function( $atts = [], $content=”” ) { add_filter( ‘wp_get_attachment_image_src’, __NAMESPACE__ . ‘\\src’ , 10, 3 ); $out = wp_playlist_shortcode( $atts, $content ); remove_filter( ‘wp_get_attachment_image_src’, __NAMESPACE__ . ‘\\src’ ); … Read more

Thumbnails on next/previous links in custom post type single.php

The first argument that get_previous_post and get_next_post is $in_same_cat. WordPress is looking for post of the same type in the current posts category. If your custom post type doesn’t support the category taxonomy, both functions are likely to return nothing for the previous and next post. Try calling both functions without arguments for your custom … Read more

How to link to YouTube videos with thumbnails?

Here is a list of some popular video grid plugins you can use without custom coding. You can create a grid of YouTube thumbnails that link to those videos. Gallery by Robo – Responsive Photo Image Gallery YouTube Gallery – Best YouTube Video Gallery for WordPress YourChannel: YouTube channel on your website Good luck!

Detect if image file is a thumbnail

You need to know your site’s current thumbnail dimension settings in order for you to detect if the $url is of thumbnail size. $thumbnail_width = get_option( ‘thumbnail_size_w’ ); $thumbnail_height = get_option( ‘thumbnail_size_h’ ); // The do detection // Assuming you have the image $url $pattern = ‘%’ . $thumbnail_width . ‘x’ . $thumbnail_height . ‘%’; … Read more

Removing Title Tag from Thumbnails

This filter will remove it completely from all images, you can add a conditional to only effect certain images. function remove_img_title($atts) { unset($atts[‘title’]); return $atts; } add_filter(‘wp_get_attachment_image_attributes’,’remove_img_title’); Instead if you want to use <?php the_post_thumbnail( ‘category-thumb’ ); ?> You can pass it an empty title using the second $attr so your title tag will look … Read more

How can i place Feature Image under title field in wp-admin?

Super late to the party, but well… If you want to show your featured image right under the Post title in your Admin area, use this piece of code in your functions.php : add_action(‘do_meta_boxes’, ‘my_cpt_move_meta_box’); function my_cpt_move_meta_box(){ remove_meta_box( ‘postimagediv’, ‘post_type’, ‘side’ ); add_meta_box(‘postimagediv’, __(‘custom name’), ‘post_thumbnail_meta_box’, ‘post_type’, ‘normal’, ‘high’); } Be sure to change post_type … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)