WordPress.org

Ready to get started?Download WordPress

Forums

Customizing Category pages (5 posts)

  1. FairlyClever
    Member
    Posted 10 years ago #

    How would I make it so on the Category pages, it only shows the title of the entries and not the whole thing?

  2. codergurl
    Member
    Posted 10 years ago #

    Maybe something like:
    <?php if ($cat || $category_name) : ?>
    <?php the_title(); ?>
    <?php else : ?>
    regular template here
    <?php endif; ?>

  3. FairlyClever
    Member
    Posted 10 years ago #

    Not like that, I mean when I'm on a page that displays all the posts in a category, say http://fairlyclever.com/categories/FairlyClever how would I make it only display the entry titles as links to the entry rather than the whole entry?

  4. planetphillip
    Member
    Posted 10 years ago #

    This is what I use:

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <?php if (!$cat){?>
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>

    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    Posted: <div class="updated"><?php the_date(); ?></div>
    <div class="date"><?php edit_post_link(); ?></div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('No comments yet'), __('Just 1 comment'), __('% Comments')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    <h3><?php single_cat_title(name); ?> </h3>
    <?php } else { ?>


    <?php } ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>

    Somebody very helpful (can't remember who - sorry) gave me the code in a previous thread.
    You'll need to chnage the code a bit to suit the layout but it should work.
    You can see it in action on my site, which is visible via my username.
    hth
    Phillip

  5. FairlyClever
    Member
    Posted 10 years ago #

    Thanks alot man, I appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.