PHP-Code inside Href-Tag

You’re using a get function, which does not echo by default. Update the PHP portion to the following: <?php echo wp_get_attachment_image($image, ‘category-large-thumb’ ); ?> Also, wp_get_attachment_image() returns a full image object – so I don’t think that’s what your after. It also most seems like you’d just want the_attachment_link: <?php the_attachment_link( $id, $fullsize, $deprecated, $permalink … Read more

WP is showing wrong image dimensions

How to get real image dimension of already uploaded images which dimensions are bigger than one now set in media settings? (Note: The italic and bold formatting above was added by me.) wp_get_attachment_image_src() indeed doesn’t necessarily return the actual width and height of the resized image file, and that the function relies upon the specific … Read more

Different thumbnail size than actual picture in post

This is quite simple to implement, using core post-thumbnails functionality. First, you need to add Theme support for the feature, via functions.php: <?php function wpse54920_setup_theme() { // Support post thumbnails add_theme_support( ‘post-thumbnails’ ); } add_action( ‘after_setup_theme’, ‘wpse54920_setup_theme’ ); ?> Next, you need to define your custom image sizes, using add_image_size(). Let’s say you want the … Read more

How can I server scaled images?

You can follow this step to set thumbnail woocommerce size Go to Appearance > Customize. Then go to WooCommerce > Product Images. Then go to WooCommerce > Product Images Write your desired width in “Thumbnail width” field. You can set the height of the images in “Thumbnail Cropping” Click on “Publish” let me know the … Read more

Add custom version to an image

so you can do that in 2 different ways 1. modify directly on template-parts/content-single.php 2. you can plug it using the add_action(pre_get_post,func_with_your_staff ) inside this function func_with_your_staff( $query ) { global $wp ; if ( $query->is_single() && empty($query->post_type) $query->set(‘post_type’, ‘wherever_is_type’); // perhaps you have a custom_post_type ?> and then you can add your extra staff … Read more

Excerpt Problems

Hopefully I’m understanding what you want correctly. I think you are going to need to wrap the content itself in a div called something like excerpt_content and make that an inline block that’s aligned to the top. Then you can use the has_post_thumbnail() as a conditional to assign it another class to limit the width … Read more