Jump to content
Sign in to follow this  
Henry Perkins

Adding another image size & class to media library & how to call it in Pagelines?

Recommended Posts

Henry Perkins

Hello, I'm loving the magazine layout, but I need to add a image size that the media library creates when I upload an image, (For example a 650x200 image labeled "Full-Width Post"), and then have Pagelines call that image size class for the Full-Width featured posts. Any direction would be appreciated. Thank you!!

Share this post


Link to post
Share on other sites
Rob
Henry, What's the purpose of this? Magazine layout is essentially a 2 column list of posts. If I understand the goal, it's to have a different size image for the full-width portion of the list and set that size to match the full width. Is that correct?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob
Just spoke to our developer and his reaction was that from a coding perspective its not really possible to do that. However, there's a simpler but labor intensive solution. You may add a full width image to an excerpt (add it to the post, copy the code then paste into the excerpt) to get full-width in the full-width post listings. BUT... when your post moves to the magazine width, that except is going to be a mess, so you need to make sure to remove the image at that point, hence it being labor intensive.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Henry Perkins
I'm looking into this and will provide an answer before long. I feel it has something to do with [b]add_image_size[/b] and [b]set_post_thumbnail_size[/b] found in media.php

Share this post


Link to post
Share on other sites
mackenzie
Let us know :)

Mackenzie - PageLines Help Desk

The Centsible Family - Writer, Photographer and Coffee Addict

---------------------------------------------------

Kindly search this forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

Share this post


Link to post
Share on other sites
Henry Perkins
Okay, So I've activated the Pagelines Customize plugin, and inserted this into the functions.php file.: [code]if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails add_image_size( 'magazine-thumb', 650, 150, true ); // Magazine thumbnails }[/code] Then, in /wp-content/themes/pagelines/includes/class.posts.php, edited the custom image size into this line: [code]$img = ( $mode == 'top' ) ? get_the_post_thumbnail( null, 'magazine-thumb' ) : get_the_post_thumbnail( null, 'magazine-thumb' );[/code] This has had no effect on my images, but I did find a plugin called [url=http://wordpress.org/extend/plugins/simple-image-sizes/]Simple Image Sizes[/url]. This plugin has alerted me to a few more custom image sizes that have been added by other plugins, notably [b]jigoshop[/b]. Are these being ignored? [code]add_image_size( 'admin_product_list', '32', '32', true ); add_image_size( 'shop_tiny', '36', '36', true ); add_image_size( 'shop_thumbnail', '90', '90', true ); add_image_size( 'shop_small', '150', '150', true ); add_image_size( 'shop_large', '300', '300', true ); add_image_size( 'post-thumbnail', '150', '150', true ); add_image_size( 'magazine-thumb', '650', '150', true );[/code] Neither my code additions or the plugin have worked to change the size of the post thumbnail images in magazine mode.

Share this post


Link to post
Share on other sites
Henry Perkins
Actually, I've just been staring too long at the screen, [b]but my previous post works even without the plugin[/b]. I was editing the local copy instead of the remote. Haha!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×