Hi guys,
I had a search for this, and couldn't see anything. i hope someone can help, because it would be a great trick for a lot of us busy domainers!!
Basically, like most of us i have a few wordpress blogs - with original content - but don't have the time to update them every few days/week or month.
So that it won't look "stale" when someone returns, I'd like to display a random post - each time someone refreshes or goes to my site.
Ok - so I found a plugin that creates a link to a random post . It's called "Random Redrect" by Matt Mullenweg. It allows you to create a link (to yourblog.example.com/?random) which will redirect someone to a random post on your blog, in a StumbleUpon-like fashion.
Ok, so well and good. You just have to make a link to yourblog.example.com/?random to do this manually
Where I get stuck is making Wordpress's home page automatically "print" this post (rather than the latest post, or page you specify) (in your Settings > Reading options.)
The code I think controls it is in home.php
and it's the third line perhaps? (This is near the top)
Any clues as to achieve this miracle? I'd be very grateful if someone could help me out!
:tu:
I had a search for this, and couldn't see anything. i hope someone can help, because it would be a great trick for a lot of us busy domainers!!
Basically, like most of us i have a few wordpress blogs - with original content - but don't have the time to update them every few days/week or month.
So that it won't look "stale" when someone returns, I'd like to display a random post - each time someone refreshes or goes to my site.
Ok - so I found a plugin that creates a link to a random post . It's called "Random Redrect" by Matt Mullenweg. It allows you to create a link (to yourblog.example.com/?random) which will redirect someone to a random post on your blog, in a StumbleUpon-like fashion.
Ok, so well and good. You just have to make a link to yourblog.example.com/?random to do this manually
Where I get stuck is making Wordpress's home page automatically "print" this post (rather than the latest post, or page you specify) (in your Settings > Reading options.)
The code I think controls it is in home.php
and it's the third line perhaps? (This is near the top)
<div id="content">
<div id="contentleft">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
Any clues as to achieve this miracle? I'd be very grateful if someone could help me out!
:tu:





