Adding archives by title in the sidebar

  • Unknown's avatar

    I have 2 issues I need help with.

    I would like to have a list on my sidebar of all previous posts, listed by title. Currently all I have is “Archives by Month” which appears like this:
    January 2015 (5)
    December 2014 (2).
    Instead I would like there to be a list like this:
    This is My 5th Post
    This is My 4th Post
    This is My 3rd Post,
    etc,
    with links directly to each post.

    My second question is if I can have each post on separate pages. Currently, all of my January posts show up on one page with the newest first.

    I am using Coraline theme. Can I do these things, and if so, how? I have done a lot of searching, and was able to create a post of my archives, but I can’t drag that into my sidebar.

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hello there!

    You can add the Recent Posts widget to your primary sidebar and it will display the blogs in the sidebar. You can also select how many of your recent posts you want to show up there.

    As far as displaying different blog posts on different pages, you should be able to use a shortcode to do that. Instructions for it are here.

    I think in your case, you could set categories for all of your posts that correspond with the page you want to pop them in to. For example, if you had a page called crazy-kittens, you could tag crazy-kittens on your related posts. Then on your crazy-kittens page put in the following code:

    [display-posts category="crazy-kittens" posts_per_page="-1" include_date="true" order="ASC" orderby="title"]

    I can’t test out my theory right now but I’m thinking it should work.
    Please let me know if it does or not. I’m curious!

  • Unknown's avatar

    This is what you need: http://en.support.wordpress.com/empty-site/

    As for listing ALL your posts, well, you can do it, but it’s a bad idea. Create a text widget and edit it manually every time you make a post. I have several thousand and can tell you that your sidebar will become useless very shortly if you do it.

  • Unknown's avatar

    DannyWellman, thanks for the advice. I added the “Recent Posts” widget and that issue has been solved.

    As for getting one post per page, I’ve tried to do it using the shortcode, but I wasn’t successful. I did add a tag to every post and then a created a new page and entered the shortcode [display-posts category="OPPP posts_per_page="-1" include_date="true" order="ASC" orderby="date"] My tag OPPP stands for One Post Per Page, original, huh? :) . Unfortunately, when I pulled up the new page, there was nothing in the body.

    One more thing I noticed is that sometimes the previous and following posts are shown at the top of the current post with arrows to take you directly there. That would be great if it would do this all the time, but I don’t know what’s causing it sometimes and not others. Can you help?

    Thanks for helping me!

  • Unknown's avatar

    Raincoaster, thanks for your reply. I don’t want to empty my site. I do appreciate you pointing out that listing all posts in the sidebar could become unmanageable, so I’ve limited it to the 5 most recent posts.

    I appreciate your help!

  • Unknown's avatar

    OK. Can you try this shortcode instead. I had some time to try it out today and it kind of works. I don’t know if it will meet your needs.

    [display-posts id="184" include_excerpt="true" image_size="thumbnail" wrapper="div"]

    You can get the post id by opening up the post to edit it in your dashboard. In the URL at the top, it lists the id in the string post=###
    Example: https://testsite.wordpress.com/wp-admin/post.php?post=184&action=edit

    The reason why I’m not sure if it’s what you want is that does indeed display just that post, but only the title and the first few lines of text in it. The image_size=”thumbnail” part of the shortcode tells the page to display any images attached to that post.

    Give it a shot and see if it will work.

    As far as the Previous and Next links showing up. Those automatically show up whenever you click in to a post to read it. They should pop up at the top. They won’t be there on your normal WordPress pages, just the posts.

    Good luck!

  • Unknown's avatar
  • Unknown's avatar

    Also check out archive shortcodes. You can use shortcodes to add archives to your sidebar or you can create a separate page for all your archives. I’m actually in the process of doing that now.

  • Unknown's avatar

    @ lainiedavila,

    The maximum number of posts allowed with the display posts shortcode is 100. To show the most recent 100 posts (the value “-1” = all posts to max of 100), including date,

    ordered by title:

    [display-posts order="ASC" posts_per_page="-1" include_date="true" orderby="title"]

    ordered by date:

    [display-posts posts_per_page="-1" include_date="true" orderby="date"]

  • Unknown's avatar

    One more thing I noticed is that sometimes the previous and following posts are shown at the top of the current post with arrows to take you directly there. That would be great if it would do this all the time, but I don’t know what’s causing it sometimes and not others. Can you help?

    Links to previous and following posts will appear on every post, except the most recent post (previous link only) and the oldest post (following link only). These links don’t appear in the “Posts” stream or in archives pages of posts, such as category, tag, author, keyword, etc. archives pages.

  • The topic ‘Adding archives by title in the sidebar’ is closed to new replies.