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)
-   -   wordpress tip: show whats coming up next on your blog (https://gfy.com/showthread.php?t=892842)

fris 03-10-2009 05:27 PM

wordpress tip: show whats coming up next on your blog
 
Often at the end of a TV show, they play some clips of what's coming up in the next episode. It's interesting to watch (Provided they don't spoil things too much on you!), simple for them to do, and near enough guarantees you'll remember to tune in again next time.

So why not do the same with your blog?

If you use WordPress's future-posting to schedule your posts for a few days in advance, you can show parts of those posts on your blog beforehand to let people know there's more to come

Why Use It?

Let's say a reader visits your blog and sees a headline that they love the sound of but can't access yet, it's going to get their curiosity up

If you copy and paste the code below into your sidebar, you will get a list of all the upcoming posts on your blog.

Code:

<ul>
<?php $my_query = new WP_Query('post_status=future&amp;order=ASC'); ?>
<?php if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Read <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; else: ?>
<li>No posts scheduled right now.</li>
<?php endif; ?>
</ul>

source: http://www.problogdesign.com/wordpre...-on-your-blog/

d-null 03-10-2009 05:29 PM

wordpress is so 2008

mozadek 03-10-2009 05:30 PM

Sounds good, thanks.

hypedough 03-10-2009 06:33 PM

Thanks fris, you f'n rock!

st0ned 03-10-2009 06:35 PM

Your WP tips are always great fris, thanks. :thumbsup

Houdini 03-10-2009 06:42 PM

That's pretty nice. It would be cool if you could add a thumb preview too. Have to work on that.

TisMe 03-10-2009 06:59 PM

How would I set the number of scheduled posts it will show?

I see on the site linked that it can be done, just not sure how.

$5 submissions 03-10-2009 07:13 PM

Good stuff as always, Fris

TisMe 03-10-2009 07:16 PM

Found it, never mind and thanks for the tip.

fris 03-10-2009 08:31 PM

using a query you can set numposts=x

fris 03-10-2009 08:33 PM

Quote:

Originally Posted by Houdini (Post 15610733)
That's pretty nice. It would be cool if you could add a thumb preview too. Have to work on that.

if you have an image attached to a post its not hard, Justin Tadlock has get_the_image plugin that will get an attached image of a post.

http://justintadlock.com/archives/20...rdpress-plugin


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

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