Forums

[resolved] How to display a post title as link in sidebar (9 posts)

  1. babypress
    Member
    Posted 4 years ago #

    If anyone could point me in the right direction on where to read or do this.

    I have an area on the front page which I wish to show the post titles as links which then link to that page?

    I think it is possible, here is what the layout is looking like This is my first go at wordpress

    Im using WP 2.5.1

  2. babypress
    Member
    Posted 4 years ago #

    hmm so far looking at http://codex.wordpress.org/The_Loop
    and
    http://codex.wordpress.org/Template_Tags/the_title
    is this the right direction?

  3. babypress
    Member
    Posted 4 years ago #

    another bit of code getting me closer
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title('<li>', '</li>'); ?></a>

    But I still need the code to generate all the posts only on the news page though

    http://codex.wordpress.org/The_Loop_in_Action

  4. haochi
    Member
    Posted 4 years ago #

    Use wp_get_archives().
    Cool domain = win!

  5. babypress
    Member
    Posted 4 years ago #

    Hi haochi, wow how did you know that, I was looking every where, it did the job, thank you so kindly

  6. babypress
    Member
    Posted 4 years ago #

    I ended up using the following:
    This formated it into a list for me
    <?php get_archives('postbypost','5','custom','<li>','</li>'); ?>

  7. musicanthology
    Member
    Posted 3 years ago #

    Hi!

    My site is like a book where categories are chapters and the posts per chapter are sections. I want the sidebar to appear like this:

    Chapter 1
    --Section 1
    --Section 2
    --Section 3
    Chapter 2
    --Section 1
    --Section 2
    --Section 3

    All codes I've tried either delete the Chapter titles (Categories) or the Sections (Title of Posts) or they start with Section 3, downwards.

    Please help!

  8. musicanthology
    Member
    Posted 3 years ago #

    Hi!

    My site is like a book where categories are chapters and the posts per chapter are sections. I want the sidebar to appear like this:

    Chapter 1
    --Section 1
    --Section 2
    --Section 3
    Chapter 2
    --Section 1
    --Section 2
    --Section 3

    All codes I've tried either delete the Chapter titles (Categories) or the Sections (Title of Posts) or they start with Section 3, downwards.

    Please help!

  9. acey
    Member
    Posted 3 years ago #

    Hi, sorry I have no answers, only a similar question.

    My post title links disappeared after the last wp upgrade and now (in the Glossy Blue theme) I only have the Categories in the sidebar with only the number (3) of posts after the Category title.

    I had the post links listed separately before the upgrade. Plse help, as this is very frustrating.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic