Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-11-2011, 03:51 AM   #1
Badmaash
Confirmed User
 
Badmaash's Avatar
 
Join Date: Jan 2007
Posts: 2,695
How to have two image sizes in WP?

Hi

Okay so lets say I want 500px Width images in index of wordpress, but when you click on the post the image size changes to say 800px - is this possible?

Thanks

B
__________________
best cbd oil uk - Hit me up on ICQ 400607632
Badmaash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 03:55 AM   #2
Dappz
Confirmed User
 
Dappz's Avatar
 
Join Date: Dec 2009
Posts: 997
yes it will posible
__________________


Hentai Artist * Draw My Anime *
HentaiLovers * hentaiG4H * ICQ : 657458
Dappz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 04:15 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by Badmaash View Post
Hi

Okay so lets say I want 500px Width images in index of wordpress, but when you click on the post the image size changes to say 800px - is this possible?

Thanks

B
add a custom image size

http://codex.wordpress.org/Function_...add_image_size
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 04:18 AM   #4
Dejan
Confirmed User
 
Industry Role:
Join Date: Apr 2006
Posts: 8,776
First of all enable "Custom Fields" under "Screen Options".
under "Name" put "thumb" and under "Value" insert link to your 500px picture.
Next you need to edit your index.php file and add this:

Code:
<?php if( get_post_meta($post->ID, "thumb", true) ): ?>

				<p><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">

			<img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" height="120" width="160" alt="<?php the_title(); ?>" /></a></p>
Dejan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 07:30 AM   #5
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by Dejan View Post
First of all enable "Custom Fields" under "Screen Options".
under "Name" put "thumb" and under "Value" insert link to your 500px picture.
Next you need to edit your index.php file and add this:

Code:
<?php if( get_post_meta($post->ID, "thumb", true) ): ?>

				<p><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">

			<img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" height="120" width="160" alt="<?php the_title(); ?>" /></a></p>
why use custom fields?

all that extra work is pointless.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 11:19 AM   #6
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
add to functions.php:
Code:
add_theme_support( 'post-thumbnails' );
add_image_size( 'homepage-thumb', 500, 2000 ); // 500 pixels wide by 2000 pixels tall, soft proportional crop mode
Inside index.php put:
Code:
<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
That is in place of your normal thumb. Then it will be smaller.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 11:20 AM   #7
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
Then install this if you have been using a different size:
http://wordpress.org/extend/plugins/...te-thumbnails/

Personally I would use excerpt to produce the text and maybe put something like this in functions.php:
Code:
function new_excerpt_length($length) {
	return 75;
}
add_filter('excerpt_length', 'new_excerpt_length');
TO change the length of the excerpt to be a bit larger... But then I write larger posts than most people...

Last edited by V_RocKs; 10-11-2011 at 11:22 AM..
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2011, 12:10 PM   #8
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by V_RocKs View Post
Then install this if you have been using a different size:
http://wordpress.org/extend/plugins/...te-thumbnails/

Personally I would use excerpt to produce the text and maybe put something like this in functions.php:
Code:
function new_excerpt_length($length) {
	return 75;
}
add_filter('excerpt_length', 'new_excerpt_length');
TO change the length of the excerpt to be a bit larger... But then I write larger posts than most people...
i usally just trim the content, writing in excerpt and a post is annoying
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.