Show title of a page other than posts on another page

glenn_1984
glenn_1984 used Ask the Experts™
on
I know that the code below will show the title of one or more blog posts on another webpage.
If I also have a page called Events, is there a way to show those titles instead?

// Include Wordpress
define('WP_USE_THEMES', false);
require('./tbsblog/wp-blog-header.php');
query_posts('showposts=1'); ?>
        <?php while (have_posts()): the_post(); ?>
       
        &nbsp;
        <?php  the_title() ; ?>
       
        <?php endwhile; ?>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
If you are trying to show the posts in your Events gallery

change

query_posts('showposts=1');

to

query_posts('category_name=events&posts_per_page=1');

if you are trying to show just a page titled events change it to

query_posts('pagename=events');

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial