GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Fuck, any Wordpress guru around? (https://gfy.com/showthread.php?t=1020420)

Nicky 04-29-2011 07:10 AM

Fuck, any Wordpress guru around?
 
I have been trying to figure out how to change the size of the "featured image" in the wordpress twenty ten theme. I want to set a size of 300x168 but whatever I try It just keeps going back to 150x150.

Any help is appreciated. :thumbsup

Serge Litehead 04-29-2011 07:14 AM

in the Media settings, did you try changing thumbnail size?

tonyparra 04-29-2011 07:39 AM

i dont even mess around with its a pain try this:

1) install simple post thumbnails
2) set size of thumbnail
3) set code in theme

5mins of work and then you can simply copy and paste thumbnail urls or upload if you really want too

xec 04-29-2011 08:30 AM

Add to style.css
.wp-post-image {
width: 150px;
height: 150px;
}
Might also want to adjust the size in your Media settings, so you won't get ugly stretched featured images.

Sid70 04-29-2011 08:40 AM

Our Australia office is within a reach of skype call to settle it down.

Nicky 04-29-2011 08:49 AM

Quote:

Originally Posted by xec (Post 18096133)
Add to style.css
.wp-post-image {
width: 150px;
height: 150px;
}
Might also want to adjust the size in your Media settings, so you won't get ugly stretched featured images.

This didn't do anything. The feature image is still 150x150.(I ofc changed the 150px in your example to the size I wanted)

xec 04-29-2011 09:00 AM

Quote:

Originally Posted by Nicky (Post 18096189)
This didn't do anything. The feature image is still 150x150.(I ofc changed the 150px in your example to the size I wanted)

Try
.wp-post-image {
width: 300px !important;
height: 168px !important;
}
and it should do it. Otherwise :Oh crap

harvey 04-29-2011 11:49 AM

I never used the twenty ten theme so I really don't know what featured image are you talking about, but I did some research and it seems it's a fucking mess, quite unexpected since you would expect a flawless theme. Anyway, just do this:

Code:

if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
        add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails
        add_image_size( 'myfeatured', 300, 168 ); // Permalink thumbnail size
}

and then in your theme's single.php and index.php (ie under the title of the post)

Code:

<?php the_post_thumbnail('myfeatured'); ?>

harvey 04-29-2011 11:50 AM

Quote:

Originally Posted by xec (Post 18096217)
Try
.wp-post-image {
width: 300px !important;
height: 168px !important;
}
and it should do it. Otherwise :Oh crap

that should work, but images would look like shit if they're created at 150x150px

Serge Litehead 04-29-2011 12:17 PM

http://www.wpmods.com/tips-on-using-...featured-image

harvey 04-29-2011 12:23 PM

Quote:

Originally Posted by holograph (Post 18096715)

that's EXACTLY what I posted 3 posts above

Serge Litehead 04-29-2011 01:47 PM

Quote:

Originally Posted by harvey (Post 18096736)
that's EXACTLY what I posted 3 posts above

You are absolutely right! I'm code blind on this board :Oh crap

tonyparra 04-29-2011 01:49 PM

Quote:

Originally Posted by harvey (Post 18096736)
that's EXACTLY what I posted 3 posts above

do what harvey says or be lazy like me

fris 04-29-2011 04:51 PM

someone needs to readup on the post thumbnail

VladS 04-29-2011 04:58 PM

Did you check out the functions.php file?

Nicky 05-01-2011 02:18 PM

Quote:

Originally Posted by harvey (Post 18096640)
I never used the twenty ten theme so I really don't know what featured image are you talking about, but I did some research and it seems it's a fucking mess, quite unexpected since you would expect a flawless theme. Anyway, just do this:

Code:

if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
        add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails
        add_image_size( 'myfeatured', 300, 168 ); // Permalink thumbnail size
}

and then in your theme's single.php and index.php (ie under the title of the post)

Code:

<?php the_post_thumbnail('myfeatured'); ?>

This did not work. This is driving me crazy :Oh crap

harvey 05-01-2011 02:45 PM

Quote:

Originally Posted by Nicky (Post 18100417)
This did not work. This is driving me crazy :Oh crap

it is IMPOSSIBLE that it doesn't work, it's the bare bones of the post-thumbnail function. You must be doing something wrong here. Now that I check what I posted, I noticed I didn't say the first snippet of code goes in your functions.php file, while the second goes in your theme's files.

sorry if this was the issue, sometimes I just give things by already known

BSleazy 05-01-2011 02:56 PM

Quote:

Originally Posted by Nicky (Post 18100417)
This did not work. This is driving me crazy :Oh crap

ICQ me and I'll get it to work if you're still having a problem.


All times are GMT -7. The time now is 09:05 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123