Adding a class to certain featured images

One option would be to do it client-side via javascript – set up some javascript to run after the page loads and cycle through all featured images that are on the page, get their dimensions and then add the class as need be. You can use the img.naturalWidth and img.naturalHeight parameters of the image element, … Read more

How to show only 2nd featured img on home/blog

Edit: This need to be placed into your template. if( class_exists(‘Dynamic_Featured_Image’) ) { //if you only want to show 2nd featured image you can do if (isset($featured_images[1])) { $image = $featured_images[1]; echo “<a href=”https://wordpress.stackexchange.com/questions/208168/{$image[“full’]}’>”; echo “<img src=”https://wordpress.stackexchange.com/questions/208168/{$image[“thumb’]}’ alt=”Dynamic Featured Image” />”; echo “</a>”; } }

Featured Image, and Image in post

on the template of the page that you are trying to pull the first image on,(if its the post itself, then single.php) you could use the following code instead of the_post_thumbnail function echo_first_image( $postID ) { $args = array( ‘numberposts’ => 1, ‘order’ => ‘ASC’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => $postID, ‘post_status’ => null, ‘post_type’ … Read more

Remove Featured Image based on Date

@Romulus Since you are using WordPress, I would highly suggest using WordPress’ functionality as much as you can. I would recommend using PHP and creating your own plugin or some kind of script that you can run. There are lots of tutorials out there that will give you the bare-bones implementation for creating a simple … Read more

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