Woocommerce: Set thumbnail detail (clipping area)

You can fix this using the following code snippet from Brian Krogsard, that I modified. This code should preferably be placed into the functions.php file of your child theme. Instead of taking the original 150×150 thumb it now takes the correct, cropped 150×150 thumb. /* This snippet removes the action that inserts thumbnails to products … Read more

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

how to resize thumbnail image

First of all: add_image_size() is to ADD a new image size into your WordPress installation. Now, as you said: I just want to resize my Image You need to enter into your wp-admin panel. Then Settings » Media, and change the thumbnail size there. Just change the thumbnail size there. Now use the plugin: Regenerate … Read more

Setting a default thumbnail url if no thumbnail

Just set up a condition to check that thumb_id isn’t empty. If it is, use your alternative image. Pretty simple stuff. <?php $thumb_id = get_post_thumbnail_id(); if ( $thumb_id ) { $thumb_url = wp_get_attachment_image_src($thumb_id,’thumbnail’, false); $thumb_url = $thumb_url[0]; } else { $thumb_url=”http://www.website.com/img/default.jpg”; } ?> <div class=”content” style=”background-image:url(<?php echo $thumb_url; ?>);”>

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