Yes, u can put the slag, and make the post that way so theadds code will be after it.
And yes, it was a beatifull article :_)
Lots of words these days about WordPress, people are getting more and more interested in high quality themes with lots of features, so ussual thing to have became post author info very useful if you have more writers. There was a guest post a bit earlier how to make a post author info outside main loop.
Now here's a tutorial how to make a author description with link, image and everything in two ways. You can see similar thing for example on Gemini Theme
Let's get started! You'll use this on single.php and the usual structure for it goes something like:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> ... <?php the_content('Read the rest'); ?> ... <?php comments_template(); ?> <!-- <?php trackback_rdf(); ?> --> <?php endwhile; endif; ?>
And now we'll add some template tags to show author description (small note, there are probably some plugins for all this, so fell free to look for them). Most common things you would like to show are author image, name, url and description. Here's new code
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> ... <?php the_content('Read the rest'); ?> ... <div class="author"> <?php echo get_avatar( get_the_author_id(), '65' ); ?> <strong><a href="<?php the_author_url(); ?> "><?php the_author(); ?></a></strong> <?php the_author_description(); ?> </div> <!-- author --> <?php comments_template(); ?> <!-- <?php trackback_rdf(); ?> --> <?php endwhile; endif; ?>
If you have used "get_avatar" you will notice that we are using a different parameter than in comments ("get_comment_author_email()"). 65 is an image size, and here's how get_avatar function works (you can read more about it on codex)
<?php echo get_avatar( $id_or_email, $size = '96', $default = ' <path_to_url>' ); ?>
So, this will generate and image with author info, and of course you should give that image some styling, in this case you can't use class because of the functions so you'll have to define it in CSS, something like .author img { border, float.... }
Here's another way if you are not using gravatars and you want to use some custom images made by kailoon http://themetation.com/2008/07/08/how-to-display-author-photo-in-wordpres/
Of course there's a third way by using custom fields, but we'll do it some other time
Further reading WordPress codex, and further idea, you can put some if-else so if there is not description to show some text etc..
Yes, u can put the slag, and make the post that way so theadds code will be after it.
And yes, it was a beatifull article :_)
Is there any fancy code that can move the start of the article text ABOVE the huge ad block?
on October 15, 2008
very nice article, thanks for sharing!