Images not working using Featured post

I believe there are some root-links that you haven’t changed. Please follow these steps Login to admin section www.xyz.com/wp-admin Navigate to settings->general-> and change the ‘Site Address (URL)’ and ‘WordPress Address (URL)’. Also please check the permalinks and settings->media there is an upload directory and the default wordpress location is wp-content/uploads, check if it is … Read more

Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?

Basically the img_caption_shortcode filter allows you to completely replace the default image caption. If you want to do that, you’ll need to ask WP to pass all the argument of the filter to your callback function. <?php add_filter(‘img_caption_shortcode’, ‘wpse81532_caption’, 10, 3 /* three args */); Then your callback will need to take care of all … Read more

wp_get_attachment_image_src() width and height boolean

This sounds like a description of the JetPack’s Photon service. Photon is an image acceleration and modification service for Jetpack-connected WordPress sites. Converted images are cached automatically and served from the WordPress.com CDN. Images can be cropped, resized, and filtered by using a simple API controlled by GET query arguments. When Photon is enabled in … Read more

Adding class to featured image

You can add custom class to post thumbnails. the_post_thumbnail accepts array of attribute $attr where you can specify image class. So your code will be. <div class=”home-featured-img”> <?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail( ‘full’, array( ‘class’ => ‘responsive-class’ ) ); // show … Read more