Add notice to add image popup
Add notice to add image popup
Add notice to add image popup
Not sure how you do it in your single.php, but I’m fairly certain not the same way. The main problem is that both the_post_thumbnail() and get_the_post_thumbnail() are generating the img tag output for you – so putting it into the src attribute of an img tag like in your code can’t work. Additionally: The latter … Read more
change true to false in set_post_thumbnail_size( 760, 330, true ) add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size( 760, 330, false ); This will make it not crop automatically.
the_post_thumbnail allows for size specificiations. So you would do: <?php the_post_thumbnail(‘medium’); ?> if you changed the image dimensions in the admin, you will need to go back and re-upload the images so they crop to the correct size that you set up If the issue is the dimensions of the image you are probably looking … Read more
So the quickest and easiest way to resolve this is to add and run the plugin Regenerate Thumbnails as Pieter Goosen suggested. Back up your db first!
While looking at some code for another issue I had a lightbulb went off in my head and brought me back to this problem. So after several tries at it I came up with this… function add_image_to_feed( $thumbz){ if( is_feed() ){ $def_thmb = get_post_meta( get_the_ID(),’def_thmb’,true); $subPath = tube_sub_dir_path(get_the_ID()); $upload_dir = wp_upload_dir(); $thumb_ur = $upload_dir[baseurl].”/tube-thumbs/”.$subPath.””; $thumbz … Read more
Can’t update/save featured image
I had the same problem after I moved one of my sites. The best solution I could come up with was to delete all of the database entries for my media (open the wp-posts table, search for all entries with a post_type of attachment and delete them. Then install the plugin Add from Server and … Read more
I think you’d need to get the actual page object and find the ID from there. Then, you can pass that ID to the_post_thumbnail(), otherwise I think the ID of a post in the loop will be used, not the actual home page. Try this $page_object = get_queried_object(); to get info about your home page.
add_image_size doesn’t do what you think it does. It doesn’t add an image of size X to a thumbnail, rather it registers an image size, and its associated dimensions. register_image_size may well have been the more appropriate name for this function. As a result, you need to register all your image sizes, on every page … Read more