Need help? Check out our Support site, then


Make pages with all posts in a category, plus sidebar listing their titles

  1. Hi. I'm used to editing self-hosted WordPress CSS and templates, but I'm new to what WordPress.com allows me to do. I now need to customise a WordPress.com site. But before I buy the Premium upgrade that allows CSS editing, I want to check whether it will allow me to do what I need. This is described below.

    I have a blog each of whose posts has one of two categories. Call these category A and category B. I want to create two pages. One must display all the posts of category A, and also have an "Archive"-type sidebar listing all the titles of only those category-A posts. The other must do the same for the posts in category B. Please note this. Both pages have sidebars, and the sidebars must display different posts on the two pages.

    So far, I am still using a free wordpress.com account. There seem to be two ways I can create pages that display all posts in a category. One is by using /category/ URLs as described in https://en.support.wordpress.com/category-pages/ , and linking these from my main menu as Category links. The other is by making an actual page and using a display-posts shortcode.

    I tried both. The disadvantage of the first method is that since the category page is not an actual page, I presumably can't put a sidebar on it. So I think I have to use the second method.

    But one disadvantage of the second method is that display-posts with include_content="true" displays the posts as bulleted lists, with titles in the same font as the body text. Does the Premium account allow me to change that with CSS, so that the bullet points disappear and the title is in a bigger font?

    Another disadvantage of the second method is that (at least in the twentysixteen theme), the only way to make a sidebar is with widgets. There is a widget for displaying post titles, but as far as I can see, I can't make it do different things on different pages' sidebars.

    The only possibility I thought of is making it display titles in both categories A and B, and then styling my category-A page so that all its category B titles are hidden (with display:none perhaps), and styling my category-B page so that all its category-A titles are hidden. Is that going to be possible in Premium? I am sure that I can edit CSS to style a widget, but I don't know whether the widget HTML distinguishes between post titles in different categories. If not, what can I do instead?

  2. I have a blog each of whose posts has one of two categories. Call these category A and category B. I want to create two pages. One must display all the posts of category A, and also have an "Archive"-type sidebar listing all the titles of only those category-A posts. The other must do the same for the posts in category B. Please note this. Both pages have sidebars, and the sidebars must display different posts on the two pages.

    Hi there! Here are the steps to have a specific category in a sidebar assigned to a specific page:

    First, Add Category Pages to your menu, and they will only display the posts for a given category.

    Then, in Customizer, add two Text Widgets in the sidebar. For each one, title it the category you want it to be. You'll notice a Visibility button at the bottom of each widget added. This is where you can assign settings for when to show or hide the specific widget.

    Finally, you can add the Display Posts Shortcode to the Text widgets to display only the posts for a given category. For your purposes, you'll want to use the shortcode that specifies the category you want shown, like in these examples, where the quotes after display-post-tag is the name of your category.

Topic Closed

This topic has been closed to new replies.

About this Topic