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 question (https://gfy.com/showthread.php?t=674457)

Boobs 11-06-2006 07:00 PM

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

CBytch 11-06-2006 08:57 PM

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 -->



All times are GMT -7. The time now is 06:24 PM.

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