List of urls instead of whole posts in categories of Wordpress

Discussion in 'WordPress' started by casperl, Apr 25, 2007.

  1. #1
    By default, Wordpress lists all content of all posts in a category. But i want only links to the original content is listed in categories. (Just like in other CMS by default) Is this possible?
     
    casperl, Apr 25, 2007 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    do u have an example of what u mean?
     
    just-4-teens, Apr 25, 2007 IP
  3. casperl

    casperl Peon

    Messages:
    1,560
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Check this as an example:
    http://www.java-tips.org/java-se-tips/java.awt/

    In Joomla, you have the content listed in this way inside category pages. (Only urls of the actual content. No summary or full content is presented inside categories). I want this on Wordpress too.
     
    casperl, Apr 25, 2007 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Heres how to do it (or at least get you on the right track)

    open up archive.php within your theme folder.

    find
    <?php while (have_posts()) : the_post(); ?>
    PHP:
    the above starts the wordpress loop, if all you want to be displayed is the title of each post remove everything between
    <?php while (have_posts()) : the_post(); ?>
    PHP:
    and
    <?php endwhile; ?>
    PHP:
    except
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    PHP:
    If you are uneasy about editing this file here is a basic example
    <?php while (have_posts()) : the_post(); ?>
    		<div class="post">
    				<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h4>
    			</div>
    		<?php endwhile; ?>
    PHP:
     
    just-4-teens, Apr 25, 2007 IP
    bfebrian and casperl like this.
  5. casperl

    casperl Peon

    Messages:
    1,560
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Excellent description. Thanks, it worked.
     
    casperl, Apr 26, 2007 IP