|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Aug 2006
Posts: 7,875
|
Wordpress question
in wordpress what's the code to display previous posts.. like list them with their post title on the sidebar "Recent Posts" also how do i change the amount to display.. much appreciated
__________________
![]() Join the fucking best in big tit sponsors!!! |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Apr 2004
Location: Toronto
Posts: 257
|
Code:
<li><!-- Activity -->
<ul><h1><?php _e('Activity'); ?></h1>
<!--This will show the last 10 posts, including the last one. To change the number of post shown
edit the 'nuberposts=x' to whatever value you want, and to skip the last one (or last 2, 3, etc.)
increase the value of 'offset=x' (default is "0" so it will start by the last post)-->
<?php
$posts = get_posts('numberposts=10&offset=0');
foreach ($posts as $post) :
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_title() ?></a>
</li>
<?php
endforeach;
?>
</ul>
</li><!-- End of Activity -->
__________________
ICQ-46523581 |
|
|
|