Wordpress question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Boobs
    Confirmed User
    • Aug 2006
    • 7875

    #1

    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!!!
  • CBytch
    Confirmed User
    • Apr 2004
    • 257

    #2
    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 -->
    Last edited by CBytch; 11-06-2006, 06:58 PM. Reason: forgot the first <
    ICQ-46523581

    Comment

    Working...