GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   How can one make money when all time goes into.....AAAaRGH! (Wordpress-question) (https://gfy.com/showthread.php?t=1036185)

jollyhumper 08-30-2011 04:12 PM

How can one make money when all time goes into.....AAAaRGH! (Wordpress-question)
 
All I want to do is to make some nice pages that will hopefully make people go nuts over the stuff they see and run to the affililate faster than... something fast.

But hey, I feel most of the time I'm only struggling with shit that steals all the time.

For instance: Post Thumbnail function that came with 2.9.
Well, I've been reading, testing, searching, reading more,testing for 6hours now.
The fucking "hooray, we have post thumbnail" is a big SCAM!

Well, probably not.

I want a thumbnail on the frontpage and when I click it I get's into the article.
How freaking difficult does they have to make it?

The "posted thumbnail" have been all over the fucking site, but it has not done what I want them to.

anyone? Please?

I'm using the Weaver2.2.4 theme (wpweaver.info)

M:)rten

mromro 08-30-2011 05:56 PM

add this to your functions.php

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 50, 50, true ); // Normal post thumbnails
add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size

// THIS LINKS THE THUMBNAIL TO THE POST PERMALINK

add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );

function my_post_image_html( $html, $post_id, $post_image_id ) {

$html = '<a href="' . get_permalink( $post_id ) . '" target="_parent" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';

return $html;
}



put this where ever you want the thumbnail

<?php the_post_thumbnail(); ?>

Put this on your single post

<?php the_post_thumbnail( 'single-post-thumbnail' ); ?>

jollyhumper 08-30-2011 07:14 PM

Thanks! This code makes more sense than a lot of examples I've seen.

But where do I put the "put thumb" and "put single-post" at the end?
In the post? in another PHP?

M:)rten

mromro 08-30-2011 07:47 PM

just before or after the content of the post or main page
in the indes.php

<p align="center"><?php the_post_thumbnail(); ?></p>
<?php the_content('Read the rest of this entry &raquo;'); ?>

in the single.php

<p align="center"><?php the_post_thumbnail('single-post-thumbnail'); ?></p>
<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>

mromro 08-30-2011 07:55 PM

You can also set the size of the thumbs in wordpress.
Dashboard
Settings
Media
then make the sizes you want and use these codes to call them up

<?php the_post_thumbnail('thumbnail'); ?>
<?php the_post_thumbnail('medium'); ?>
<?php the_post_thumbnail('large'); ?>

jollyhumper 08-31-2011 03:32 PM

Thanks for your reply :)

M:)rten


All times are GMT -7. The time now is 10:16 PM.

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