Tag Info

New answers tagged

0

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="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> ...


0

In my case, this issue was caused by filer permissions on the images. I had copied the images from one server to another, forgetting to change the ownership. When new image sizes were set, and I regenerated them, the old images weren't overwritten as they should have been. To fix this I connected to my server with SSH, navigated to the wp-content/uploads ...


0

Maybe you need to use set_post_thumbnail_size(); for thumbnails? And then the the_post_thumbnail('vip-thumb' ); https://codex.wordpress.org/Function_Reference/set_post_thumbnail_size


0

For all my answers I'm assuming you both have the legal rights to use those images and are aware of any implications of duplicate content (SEO etc). That being said there are definitely ways. At what point would you like to scrape images? Regularly? If so look into WP_Cron and automate it. If you just want to scrape the image once you generate a new post, ...


0

In your page.php or single.php whichever is concerned here. After the post title code, add this: <?php the_post_thumbnail(); ?> Additional modification can be found in Codex


-1

I managed to solve this issue by switching from PHP version 5.5 to version 5.4


0

It is extremely unlikely that code file of identical content would behave differently. From your description of situation I see two possibilities: File does get changed for some reason, you should not only upload clean copy, but actually compare what you have on server at that point against what you have locally You are mis-identifying upload as the key ...


0

to prevent WordPress from making the additional sizes for certain images only, you would have to have a way to indicate that an image you are ABOUT TO upload will be used only for a particular purpose. this must happen BEFORE you uploaded it. since there is no such interface (out-of-the-box) to indicate such options during an upload action, then you cannot ...


0

first of all add theme support for post-thumbnails with the following "function.php" add_theme_support( 'post-thumbnails' ); then add image size with the following code "function.php" add_image_size( 'portfolio', 600, 600, true ); use both of these inside a function which you have to hook into add_action( 'after_setup_theme', 'prefix_theme_setup' ); ...


-1

there is a similar question here: Post type specific upload folder in 3.5 Just add an IF case whenever the wanted post type is the one you want to be in another folder, if not, return the directory given by the filter.


0

I think it is possible with custom fields. Add a custom fields, for example, named link. Put the link into the value field. Then you will be able to access it something like that: <a href="<?php echo get_post_meta( get_the_ID(), 'link', true ); ?>"> <?php the_post_thumbnail(); ?> </a>


0

Hi – i had a similar problem. Woocommerce uses catalogue images for catalogue and related product images. That is not ideal, for you loose either image quality or speed. So i tried to add a fourth image category for my related products. Howdy McGee has solved the problem. Please take a look at Howdy McGees answer: Modify Related Product Image Sizes: read ...


-2

wp_get_attachment_image_src(get_the_post_thumbnail($post_id, array( 100, 100)));


0

Found out that the answer was these two functions: https://codex.wordpress.org/Function_Reference/wp_generate_attachment_metadata https://codex.wordpress.org/Function_Reference/wp_update_attachment_metadata


0

I got an answer to it on some website... Just edit your css or add some css plugin (jetpack edit css, etc.) .single .category-video .post-thumbnail img { display: none; } Replace video with your category name... No need to change any theme functions...



Top 50 recent answers are included