Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved post clips size

Question

Posted · Report post

post clip image is served in full size. i am talking about magazine mode. how to change that? it does slow down my page.

Share this post


Link to post
Share on other sites

40 answers to this question

Posted · Report post

Hi Jan, If I understand you correctly, do you want to change the image size in Magazine mode ? Also can you provide a link to your site please or is this local ?

Share this post


Link to post
Share on other sites

Posted · Report post

yes you understand correctly. just standard instalation with blog in magazine mode.

Share this post


Link to post
Share on other sites

Posted · Report post

thats the solution. Took a while but thank you both to @simon and @simple_mama

add_filter( 'post_thumbnail_size', 'my_post_image_size' ); function my_post_image_size( $size ) {
	    if ( is_single() )
	        return $size;
	    else
	        return 'medium';
	}

topic closed!

Share this post


Link to post
Share on other sites

Posted · Report post

do you mind to give me an working example of this filter, so i could play with this code? i have no idea about php.

Share this post


Link to post
Share on other sites

Posted · Report post

If you inspect the magazine image using Firebug (or similar) you will see the following:

[/code]

	
	And the CSS shows:
	
	
[code]element.style { max-width: 150px; width: 25%; }
Which means it is inline CSS styling. To change this, you will need to adjust both the max-width and the width values to whatever you want. To make sure it only applies to the clip's CSS, you'll need to start out by using
.clip_box

.. and then go from there using the CSS from the link I posted at the top.

Share this post


Link to post
Share on other sites

Posted · Report post

Unfortunately, I'm not much of a PHP person either and I'm not a developer. : I think @simon would be better at explaining. An explanation from me may not be the best! Tutorials that describe WP filters more in-depth and have examples may be helpful, though.

Share this post


Link to post
Share on other sites

Posted · Report post

i don t want to resize down the image, i want to load thumbnail instead. As i can see the image is using class img.attachment-large.wp-post-image Is magazine mode, a pagelines functionality or it comes from wordpress? if it pagelines layout, then it should be modified, i dont see a reason to load full size image on post list.

Share this post


Link to post
Share on other sites

Posted · Report post

The file would be class.posts.php function is post_thumbnail_markup() I strongly suggest to not edit this or any file! There is a filter supplied in this function for you to change the markup:

return apply_filters( 'pagelines_thumb_markup', $output, $mode, $format );

Share this post


Link to post
Share on other sites

Posted · Report post

magazine mode uses the thumb images for the image if they exist.

Share this post


Link to post
Share on other sites

Posted · Report post

@jankowalski Send me your URL via PM with the thumb on top as your current layout, as well as your desired thumb size, and I'll see if I can hack it with CSS, if you'd like.

Share this post


Link to post
Share on other sites

Posted · Report post

how do i create thumbs, in admin panel, in settings / Media i set thumbnails 100 x 150 in Media / libary this particular picture is 600 x 400 px how do i make sure i have thumb generated for this picture thou? i guess i do not have, if full size pictures are loading on blog page.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Jan, Are you by any chance using the "Feature Post Excerpt Mode" option "On Top" ?

Share this post


Link to post
Share on other sites

Posted · Report post

yes @danny i do use this option

Share this post


Link to post
Share on other sites

Posted · Report post

OK, because I just used that option and found that the image was also full size, I think this may well be a bug with that option (nice catch). I'll add this to the tracker on your behalf, thanks for bring this to our attention.

Share this post


Link to post
Share on other sites

Posted · Report post

The image on top option is supposed to be full size, thats the idea

Share this post


Link to post
Share on other sites