Need help? Check out our Support site, then


How do I display category posts in a LIST on Motif theme?

  1. Hi! I am trying to use shortcodes (my first time! a shortcode newbie!) in order to change my display on the Motif theme when a visitor clicks on Categories in my header or sidebar menu. Motif simply presents consecutive posts scrolling on and on, but I would like a LIST. As this Category part of the menu doesn't actually have a page to put code on, I don't know what to do. I've read about display posts shortcode, archives shortcode and more but still feel lost. Thank you so much for your help!

    The blog I need help with is thegreensheep.wordpress.com.

  2. Hi thegreensheep,

    I don't believe you can do what you are looking for with shortcodes.

    You are looking to change the way the category page displays, and that is just built into the theme.

    You could however try some custom css to see if you could hide things and make it look like you want.

    For instance I think if you added something like this

    .category article div {
      display: none;
    }

    It would hide everything except the post titles on the category pages.
    Is that a start to what you're looking to do?

  3. @sandymcfadden--very clever, I'm impressed!

  4. I will have to try this! I don't know enough code to imagine the outcome of what you've written, but I'd like to try. Here's what I did: I went ahead and started building separate PAGES for each of my categories -- with each page using the display posts shortcode, including an image. (Took me a long time to go back through all my posts and assign a featured image to each.) Then I'll stack those pages into a drop-down menu.

  5. Thank you so much for dreaming something up, just to answer my query!

  6. @sandymcfadden, would I paste that code onto the "css revisions" page that's part of the custom design upgrade? Still trying to figure out where code is supposed to go :/

  7. @thegreensheep, The css revisions is the right spot to put that code, you're right.

    It might not be exactly what you are looking for, but if it is a start we could play with it to get it there.

  8. Thanks. Not sure when my next chance to sit down and try will be, but I'll let you know when I do.

  9. Oh my, @sandymcfadden, that works perfectly. THANKS!

    My solution above looks like this:

    http://snag.gy/qa0RU.jpg

    Your solution looks like this:

    http://snag.gy/JZ2nL.jpg

    Yours is so simple! I would love to add two more things to it: 1) an image to accompany each post title and 2) the ability to show more than 4 items in a list. Can you help me with those? (I'll go see if I can find the solution to the four-item-limit myself right now.)

  10. For my solution, this was the display posts shortcode I used

    [display-posts category="*CATEGORY*" image_size="thumbnail"]

    plus this to make the images align left

    .display-posts-listing .listing-item {
    clear: both;
    }

    .display-posts-listing img {
    float: left;
    margin: 0 10px 10px 0;
    }

    But one thing I particularly like about the results of YOUR solution is that each post title is presented in its own box. Nice.

  11. @thegreensheep I'm glad it's getting close to something you like.

    I believe the number of posts is controlled by the the setting under Settings then Reading titled "Blog pages show at most x posts"
    Where x is the max number of posts you want shown.

    Now that setting will affect all post pages on the blog. I also think that the theme you are using will only display a maximum of four. So I'm not sure you can change that part.

    .category article div {
      display: none;
    }
    .category .entry-thumbnail {
      display: block !important;
      position: absolute;
      max-width: 150px;
      top: 0;
      left: 0;
      max-height: 70px;
    }
    .category .entry-header {
      margin-left: 160px;
    }
    .category article.post {
      position: relative;
      min-height: 70px;
    }

    I think this updated code will display a thumbnail image next to each title though for you.
    Let me know if that works out or maybe only displaying 4 is a deal breaker for this way.

  12. @sandymcfadden, it's beautiful! (I opened up the number in a list from 4 to 20 -- not limited on my theme.)

    Wish you could share this bit of code more widely, as I'm sure others would appreciate knowing how to do this. I changed my theme in April and have watched my stats suffer because site navigation was so difficult.

    Thanks again!

  13. Fantastic. I'm glad it worked for you!
    Hopefully it will help with the stats as well.

You must log in to post.

About this Topic