add youtube thumbnail in index and single.php add video

To solve this: 1. Add custom meta to each post which take youtube url( name of custom meta in code youtube). 2. In index.php loop: while(have_posts()){ the_post(); //use [get_post_meta][3] to get youtube post meta $youtube_img = ‘http://img.youtube.com/vi/’.substr( get_post_meta($post-ID,’youtube’) ).’/0.jpg’; //$youtube_img is your youtube video image url echo ‘<a href=”‘.get_permalink().'”>’; echo ‘<img src=”‘.$youtube_img.'” title=”‘.get_the_title().'” alt=”youtube video … Read more

Timthumb not working with WordPress 4.0

If folder permission are correct then it should work. Anyway try this one. And let me know how it goes. <img src=”https://wordpress.stackexchange.com/questions/160273/<?php bloginfo(“stylesheet_directory’); ?>/timthumb.php?src=<?php $featured_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); echo $featured_image_url[0]; ?>&amp;h=170&amp;w=170&amp;zc=1″ alt=”<?php echo get_the_title(); ?>” />

Thumbnail generating and posting

How image gets cropped depends on how the respective size was defined with add_image_size(). In the past it was limited to soft or hard crop modes, always respective to the center of image. Now you can also pass more elaborate directions for the crop, such as array( ‘left’, ‘top’ ). See the linked documentation for … Read more

Why are thumbnails not being generated for PDF files?

I found a solution! I hope this helps save some time and frustration for others that might encounter this problem. It turns out that it isn’t WordPress or PHP. After a lot of digging, I came across this discussion by some members of the WordPress Core team: https://core.trac.wordpress.org/ticket/48853. It says that there is some kind … Read more

Custom image size mixes width and height in output

The “medium” and “large” are not custom image sizes – they are already part of the core WordPress media sizes and they should be handled via the “settings” -> “media” options page in wp-admin. Give your custom image sizes a different and more unique name (reserved are thumbnail, medium, large, full)

How can i make this in the_post_thumbnail?

If you want to ensure your image sizes remain available when switching themes, then you should place them into a plugin. Create a .php file (name it what you want) and place it in wp-content/plugins/, then paste the following: <?php /* Plugin Name: My Custom Image Sizes Plugin URI: http://pippinsplugins.com/ Description: Images sizes to be … Read more

Regenerate thumbnails for images that are not in the media library

wp-content/uploads images wont regenerate if they are not shown in the Media Library because those media ID’s needs to be there in the database.You need to first add your images on the media libray with the help of add-from-server plugin. Then with regenerate-thumbnails plugin you can then regenerate all of you images. Hope that helps!!

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