Screenshot.png not showing up
Try changing the file extension to .jpg instead of .png; I had this issue as well, and for some reason it won’t accept .png but .jpg
Try changing the file extension to .jpg instead of .png; I had this issue as well, and for some reason it won’t accept .png but .jpg
First off, PNGs do not necessarily slow your site down anymore than a JPG. It all depends on how the image is saved or optimized and the file size. Anyway. You have a couple options. Since this site is about coding and we don’t support 3rd party plugins I will give you this first. You … Read more
WordPress has a hook for that. Here is a sample code: function featured_image_dimensions( $content, $post_id, $thumbnail_id ){ $help_text=”<p>” . __( ‘recommended dimensions – H980px by W450px’, ‘my_domain’ ) . ‘</p>’; return $help_text . $content; } add_filter( ‘admin_post_thumbnail_html’, ‘featured_image_dimensions’, 10, 3 ); Add this code to your functions.php and you should be good to go.
I tried to replicate your issue and while the dev tools show it as alt the source code shows alt=””, so WordPress is not stripping the quotes, it’s just the dev tools being concise. But even if it was, they’re equivalent so alt and alt=”” are the same. As for why the dev tools display … Read more
I solved the problem. In the style.css I needed to make the following change #content img { margin: 0; height: auto; max-width: 640px; /*width: auto;*/ } I now wonder how to make that stay for all the following theme updates…
This should be able to return the url of the large image. $largeImg = wp_get_attachment_link( $attachment_id, ‘large’, false ); There’s also this incase that doesn’t work. wp_get_attachment_image_src( $attachment_id, ‘large’ );
You can call add_image_size in your functions.php: add_image_size( ‘medium’, 240, 160, true ); Reference here: http://codex.wordpress.org/Function_Reference/add_image_size
I think the php you’ll need to put into your template is <?php the_title();?> and <?php the_excerpt();?> Wrapped up in whatever you are using to do the hover
You should use the ‘orderby’ => ‘rand’ parameter for the get_children() attachments function. For instance: $images = get_children( array( ‘orderby’ => ‘rand’, // this is random param ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => get_the_ID(), );
use strip_tags + substr substr( strip_tags( get_the_excerpt() ),0,235);