Format posts – sidebar and on a page

  • Unknown's avatar

    Two problems, but I think related as they are both to do with displaying posts. So I’ll ask together rather than in two posts.

    1. I’d like a page that displays posts of a specified category. But as I want to precede the posts with some fixed text, I need to do it on a page, rather than just putting a link to the category page in my menu.

    I’ve tried to do this at https://auntyclare.wordpress.com/concerts/ but the display is messy. How do I make it appear just like the category page at https://auntyclare.wordpress.com/category/this-season/.

    Code is [display-posts category="this-season" image_size="thumbnail" include_excerpt="true" posts_per_page="-1" order="DESC" orderby="date"]

    2. The “next concert” widget in the sidebar. On a wide screen, the blue link, “Next” appears top right of the thumbnail. “Concert” then appears below the thumbnail. I’d like the link to be tidily underneatht the thumbnail.

    Code is [display-posts tag="next" include_excerpt="true" image_size="thumbnail" wrapper="div"]

    I’ve tried with and without wrapper="div" Doesn’t make a difference.

    (This effect may or may not be visible, depending when you look. I edited the post title to be “Mozart and Kodaly” and that showed up neatly at the bottom of the image. Because I want to know what to do if I have the problem when another concert is our “next,” I’ve just changed the title back to “Next concert!” But there always seems a delay before changes like this show up, so it may be half an hour before it does.)

    I’d be grateful for advice in how to tidy up both of these. Thank you.

    Clare

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

  • Unknown's avatar

    Oops, sorry. The “concerts” page isn’t a page, it’s a post. I want Join Us, Hear Us, Book Us and Support Us all to show up in the sidebar. And as far as I’m aware, if I want image and text, I have to use display_posts in a text widget.

    It would be easier for others managing the site to understand if I can make those 4 pages instead of posts. Is there a way I can display featured image and link for each of the 4 in the side bar? If possible, I don’t want the full top pages menu showing up there though. And having the images will draw attention better than just some links.

  • Unknown's avatar

    To style stuff in display-posts, you have to have the WordPress.com Premium Plan upgrade since we have to do it with custom CSS. It isn’t something that can be added within the shortcode.

    The widget is an easy fix with the following simple CSS rule.

    .listing-item .image {
        float: none;
    }

    The display-posts stuff in a post or page would be a bit more complicated, but it can be done. With the upgrade.

    You can try out and preview custom CSS before you buy as explained here.

  • Unknown's avatar

    Thanks very much for your help. I’m glad to know it’s possible.

    I can’t try out the preview for the widget yet: in preview mode, the screen isn’t so wide and the link displays under the image! But as long as I know it’s possible, that’s all I need for now.

    I’ll wait till I get a firm go-ahead from the committee to move our side to WP.com and then come back to you for advice about the display-posts in a post or page CSS.

    Thanks again.
    Clare

  • Unknown's avatar

    Clare, you are welcome and let us know if you have further questions.

  • The topic ‘Format posts – sidebar and on a page’ is closed to new replies.