• Resolved nobody12

    (@nobody12)


    Hi,
    I am wondering whether it’s possible to adjust the picture to the left, but next to the text, not above it.
    Thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    If you are referring to the featured image added to the RSS feed excerpts or at the beginning of the post (Featured Image under Full Text settings), sure, you can do this in the plugin settings. You’ll want to change the featured image alignment to Left, and choose a small image size, such as Thumbnail, for the featured image size.

    Hope that helps!

    Thread Starter nobody12

    (@nobody12)

    Yes, was referring to a picture added at the beginning of the post. It helped a lot, THX.

    One more question… is it possible to use “Alternate feed” option to display full-sized pictures and other default feeds (like category filtered) to use Thumbnails?

    Thank you for your time.

    Plugin Author Robin Cornett

    (@littlerchicken)

    Yes, there is a filter on the image size. You can use a WordPress conditional to check which feed is being viewed and change the size accordingly. This code would replace the plugin set image with the full size version in the alternate feed:

    
    add_filter( 'send_images_rss_thumbnail_size', 'prefix_change_thumbnail_size_alt_feed' );
    /**
     * Change the feed image size for the alternate feed.
     *
     * @param $image_size string
     */
    function prefix_change_thumbnail_size_alt_feed( $image_size ) {
    	if ( is_feed( 'email' ) ) {
    		$image_size = 'full';
    	}
    
    	return $image_size;
    }
    

    You would need to add it to your theme’s functions.php file or wherever you add custom code. Please make sure your files are backed up, practice safe coding, etc. Hope that helps.

    Thread Starter nobody12

    (@nobody12)

    Thanks a lot Robin! It’s amazing what can be done with your plugin ??

    Could you, please, modify the function, so the alignment for the alternate feed is “center” ?

    After that, it would be perfect.
    Thank you for your time!

    Plugin Author Robin Cornett

    (@littlerchicken)

    So if you are wanting to override multiple settings values, what you might do instead of the code above is to just override what the plugin thinks the setting is when it’s on the alternate feed. So you could replace that code/filter with this one:

    
    add_filter( 'sendimagesrss_get_setting', 'prefix_override_sendimagesrss_setting', 99 );
    /**
     * Override the plugin settings for the alternate feed.
     *
     * @param $setting
     *
     * @return mixed
     */
    function prefix_override_sendimagesrss_setting( $setting ) {
    	if ( is_feed( 'email' ) ) {
    		$setting['thumbnail_size'] = 'full';
    		$setting['alignment']      = 'center';
    	}
    
    	return $setting;
    }
    

    This should change the featured image (thumbnail) size and alignment from the plugin settings values, but only on the alternate feed.

    Note that this is a different filter hook. Hope that helps!

    Thread Starter nobody12

    (@nobody12)

    Thank you for your help Robin. It’s perfect now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pictures aligned next to a text’ is closed to new replies.