Tweak next_post_link for it to include thumbnail

If you have a look at what next_post_link you’ll see that it takes a parameter $link as the second argument: next_post_link( $format, $link, $in_same_term = false, $excluded_terms=””, $taxonomy = ‘category’ ); Your parameter for this currently doesn’t include the post thumbnail: _x( ‘%title <span class=”meta-nav”>&rarr;</span>’, ‘Next post link’, ‘nicosite’ ) So we need to add … Read more

Get post thumbnail to display favorites

get_post_thumbnail_id() only returns the ID of the thumbnail. To get the actual thumbnail you could instead use get_the_post_thumbnail() You can also get the image using it´s ID, but that requires wp_get_attachment_image( get_post_thumbnail_id(), ‘full’ )

Get the featured image url of clicked post

It seems you are using this outside the loop then use get_the_post_thumbnail to get the featured image for any post by supplying post id. So your code will become this. <?php if ( has_post_thumbnail() ) { echo ‘<a href=”‘ . get_permalink( $post->ID ) . ‘” >’; echo get_the_post_thumbnail( $post->ID, ‘my_feature_image’, array( ‘class’ => “someName” ) … Read more

Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio

Here is my resolution: Download and unzip JCrop and unzip jquery.Jcrop.min.js & jquery.Jcrop.css to the js & css sub-directory respectively under the theme template directory. Place the following code in header.php just before </head> (you need to comment out the first line if you’ve already include the jquery.min.js in the other place): <script src=”https://wordpress.stackexchange.com/questions/209358/<?php echo … Read more

Full width featured thumbnail

The easiest way would be to do away with the content.php file for this template and move everything to your single-thumbnail-featured.php so you don’t mess up any other pages using content.php. Then I would simply move the_post_thumbnail() outside the col-md-8 into a full width col-md-12. single-thumbnail-featured.php //Loads the header in which there is a container … Read more