call a specific category post title into a page.
-
hello,
<?php query_posts('cat=4&showposts=1'); ?> <ul style="list-style-type:none;"> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php endwhile;?>
I use the above code to call a post title from a specific category. It works fine with the custom page templates. However, when I insert the code into a wordpress page, the code does not show up the title. What do I need to do to let wordpress recognize the code.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘call a specific category post title into a page.’ is closed to new replies.