• Resolved edeonard

    (@edeonard)


    Hi,
    I have some menu items to display posts split by categories etc…. I got some custom CSS to show all posts in a single file layout, but when done by category its back to the 2×2 layout.

    How can I show posts in single file format when split by category

    eg: all posts layout

    post 1
    post 2
    post 3
    post 4

    by category layout

    post 1 post 2
    post 3 post 4

    and so on… I’d like the single file to be the uniform method of listing.

    Thanks in advance
    Best regards
    Ed

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi Ed,

    Thanks for using Chosen!

    To target any archive page (category, tag), you can add an .archive class to the beginning of your CSS selector. Likewise, you can do the same with a .search selector to target search results pages, and .blog if you want to only target the posts page in particular.

    If you share the CSS you’re currently using here, I can update it with these classes for you so it will work across the site.

    Thread Starter edeonard

    (@edeonard)

    Hi Ben,
    I tried those and it’s not catching the right elements as yet. current custom css is:

    .page .post-title {
    display: none;
    }

    .post-header {
    font-size: 11px;
    }

    .blog .entry,
    .archive .entry
    .search .entry {
    padding-right: 40px;
    padding-left: 40px;
    margin-left: 20px;
    width: 100% !important;
    }

    Theme Author Ben Sibley

    (@bensibley)

    That will work, but there is a comma missing after .archive .entry. I just tested it and it works great once that’s added.

    Thread Starter edeonard

    (@edeonard)

    Lovely, that’s fixed it. Thanks very much for your help. Much appreciated

    Theme Author Ben Sibley

    (@bensibley)

    No problem, happy to help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom CSS – Display posts by category in single file’ is closed to new replies.