how to query or call post titles only in wordpress

Discussion in 'WordPress' started by Nigel Lew, Sep 8, 2008.

  1. #1
    I can't for the life of me sort this out. I basically just need the snip of php to call the post titles only into a bulleted list from a specific category.

    So I would have a clickable list of post titles.

    thanks for the help,
    Nigel
     
    Nigel Lew, Sep 8, 2008 IP
  2. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #2
    You probably already have this and you don't realise it.

    Strip down your index.php template so that you only display this part

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    Code (markup):
    To do this for a selected category you would use something like <?php if ( in_category('3') ) { ?>


    There is a good example of how to do this here.
     
    System0, Sep 9, 2008 IP
  3. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #3
    Ah, you are correct!. Thanks alot.

    Nigel
     
    Nigel Lew, Sep 9, 2008 IP