WordPress.org

Ready to get started?Download WordPress

Forums

Show Post Titles Instead of Full Post (12 posts)

  1. icklebug
    Member
    Posted 9 years ago #

    I'm re-designing my husband's Movie Review website using WordPress, but I've run into a bit of a problem.

    When you click on the category title, I would really like it if there was a list of the posts in that category, rather than having one full post taking up each page. As it is, it's making navigation rather difficult as instead of clicking on a link for, say, Horror, then choosing what film review you want to read from the list, we're seeing one review per page, and having to click around 'previous pages', etc, to find the review we want.

    There are going to be loads of reviews, so they wouldn't all fit into the side bar. So is it possible to make the category links lead to a list of current reviews without doing it all manually each time a review is added?

    Thank you in advance!

  2. dss
    Member
    Posted 9 years ago #

    I do that in one of my site's archives because i wanted to show a LOT of entries, and spare the reader all the hub bub.

    there's a couple things to do:

    1. in your archives.php of the default theme you'll find a pesky expression called the_excerpt()

    you could just change that to the_title()

    but that would show the title twice (kinda dumb.)

    What i finally did was just remove the get bit and just left the title info. So i have a nice long list of titles (clickable permalinks) styled as h2.

    Ryan Borens front page category plugin also helped a lot to allow 5 posts on the front page, but 25 in the archives.

    good luck!

  3. icklebug
    Member
    Posted 9 years ago #

    Thanks for the quick reply, Dss! However, I'm using the Black-Letterhead theme by Ulysses Ronquillo and I cant find the expression called the_excerpt() unfortunately.

    There also wont be any archives, as it's just going to be done like a 'normal' website with no blog or need to look at past entries, if you know what I mean?

    Here is a link to how the site currently looks. It's nowhere near finished, and the Archives will be deleted, but I'm hoping this will illustrate the problem we're having. Once finished, there will be at least 200 reviews online, so as you can imagine, trying to find reviews by clicking on 'previous post' will get very tedious! Even just having excerpts will take up a lot of much needed space.

    If you or anyone else knows of a way to show /just/ the post titles on a page when a category link is clicked I would be eternally grateful! Thanks again for your help!

  4. Lorelle
    Member
    Posted 9 years ago #

    Look in the index.php with the WordPress Loop for the_content(). Change that following the instructions for changing from the_excerpt().

  5. VeronicaRose
    Member
    Posted 8 years ago #

    I'm also trying to create a list of permalinks in my archives, except that I don't have an archives.php. I went to the index and tried that last trick and it worked, but it changed my front page as well - which I wanted to stay the same. Should I create an archives.php? How would I do that?

  6. beachline
    Member
    Posted 8 years ago #

    i'm looking for something exactly like this. i went to the beardyfreak website and i wanted something like that, although it doesn't look like veronica used wp to get the site like that.

    i couldn't find the_excerpt() either. i'm using wp 2.0.3 default theme.

  7. moshu
    Member
    Posted 8 years ago #

    They have changed it since 2.0: it has the_content even in the archive.php template file. (I guess it happened because every day there were 2-3 desperate posts like OMG, where is the rest of my post...LOL)
    If you want only titles - delete the_content from the Loop.

  8. beachline
    Member
    Posted 8 years ago #

    i'm sorry, what's the Loop? i clicked on the link above and it doesn't work :(

    EDIT: Nevermind! I found it. I'll see if it works now. Thanks for the reply :)

    EDIT 2:

    It works like this:
    in archive.php, i took out


    <small><?php the_time('l, F jS, Y') ?></small>

    <div class="entry">
    <?php the_content() ?>
    </div>
    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    then, personally, removed the <h3> tag. any code inside the

    note to readers interested in doing this to their site, any code inside

    <?php while (have_posts()) : the_post(); ?>
    <div class="post">
    </div>
    <? php endwhile....
    could be modified to change the look of the listing.

    example of a category on my site should anyone want a demo:
    http://hplistings.com/x/?cat=2

  9. moshu
    Member
    Posted 8 years ago #

    http://codex.wordpress.org/The_Loop
    The Loop is the code portion in your template files that displays the posts (Pages) - what is stored in the database.

    Actually if you open the archive.php file for edit you'll find only one instance of the template tag
    the_content (reading: http://codex.wordpress.org/Template_Tags/the_content)

  10. klifix2
    Member
    Posted 8 years ago #

    I use CGfeedreader to get the last 5 or any other nr of posts to apear (only the titles). It works perfect. You can get the feed like this: http://www.yourdomain.com/categorie/catname/feed/

  11. CharlesKrause
    Member
    Posted 8 years ago #

    I'll take a crack at it :)

    You could use conditional tags in the index.php file.

    Fine the line that says

    '<?php the_content('some message here'); ?>'

    "some message here" will be whatever you use as a link for the "more" tag link text.

    replace it with the following

    <?php if (is_category()) : ?>

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>

    <?php else : ?>
    <?php the_content('some message here'); ?>
    <?php endif; ?>

    This tells Wordress...

    If it's a category page
    -- Just show the name of the post, as a link to the article's page
    else
    -- Show everything as normal.

    I'm doing something similar on my front page of the blog I'm just building.

    http://memetic-selection.no-ip.info/

    Although I'm showing some custom formatted meta-data and "the excerpt" (I'm using the excerpt as a sort of synopsis/abstract for the whole article/post) as well as just the linked title, but what shows on my main page is differnt information, and in a different format, than the posts/articles themselves.

    What tags should go around the custom information section will vary on your theme. You may want to add CSS class names to the tag, you may want to use a <div> tag with/without class name, etc. - but that depends on your theme formatting. This code will at least get the information you want when you want it (I hope :>).

  12. CharlesKrause
    Member
    Posted 8 years ago #

    Ack!

    My apologies!

    I thought I was editing the post for the code formatting - NOT spamming the thread with 20 copies!!

    :(

Topic Closed

This topic has been closed to new replies.

About this Topic