Can’t update/save featured image
Can’t update/save featured image
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
I took a quick look at the Modern Tribe’s source code, particularly the single-event.php view template. MT is using an internal function, tribe_event_featured_image(), which includes a filter: tribe_event_featured_image. You could use this filter to see if MT has already found an image, and, if not, look up your own and return its value. add_filter( ‘tribe_event_featured_image’, … Read more
Recent posts show thumbnail
Force Regenerate Thumbnails Not Working
The second if statement requires it to be a post, so a 404 page won’t pass. I’d re-do it like this, using elseif statements. I also changed $thumbnail->ID to $post->ID since the former was not defined. add_action( ‘genesis_before_header’, ‘minimum_featured_image’ ); function minimum_featured_image() { global $post; if ( is_home() ) { echo ‘<div id=”featured-image-home”>’; echo get_the_post_thumbnail($post->ID, … Read more
You will have to edit your theme files for that, but you can use the_post_thumbnail (Codex) to show the featured image in a smaller size. This is an example from the Codex which you can probably use 1 to 1: <?php if ( has_post_thumbnail() ) : ?> <a href=”https://wordpress.stackexchange.com/questions/189741/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”> <?php … Read more
I think from your question you might want to look at adding a new thumbnail image size into your functions.php add_image_size( $name, $width, $height, $crop ); https://codex.wordpress.org/Function_Reference/add_image_size You’ll then need to regenerate the post thumbnails, as you’ve added a new image size, there is a plugin called “Regenerate Thumbnails” https://wordpress.org/plugins/regenerate-thumbnails/ Then you’ll need to set … Read more