WordPress.org

Support

Support » Plugins and Hacks » Display Posts Shortcode » [Resolved] Styling posts with CSS

[Resolved] Styling posts with CSS

  • bdd

    @bws-online

    I’m trying to display posts from two different categories on the same page, and need to style the categories differently from one another.

    The entries for the first category each have a thumbnail, a title (linked) and a description.

    The entries for the second list each have a title (linked).

    I saw in another post to use these in CSS to style the title, image, and listing:
    .display-posts-listing .title
    .display-posts-listing img
    .display-posts-listing li

    That worked fine for the individual lists, but is there any way to handle the styling for two different lists (so they don’t both have to use the same CSS)?

    Right now I have the first list set up, but then the second list is spaced out way too much (since there are no thumbnails).

    Are there other classes to style as well? (Is there a reference for these somewhere?)

    Thanks for the guidance/assistance.

    http://wordpress.org/extend/plugins/display-posts-shortcode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bill Erickson

    @billerickson

    The easiest thing to do would be to switch to HTML view and wrap your second one in a div, like this:

    <div class=”alternate-styling”>

    [display-posts category=”xxx”]

    </div>

    Then you can use this CSS:

    .alternate-styling .display-posts-listing .title

    bdd

    @bws-online

    Sounds good in theory, but it’s not working.

    I feel like I must be missing something….

    Are there default declarations for the CSS somewhere else that might be overwriting what I’m doing in my child theme style.css?

    Plugin Author Bill Erickson

    @billerickson

    Display Posts Shortcode comes with no CSS, so it’s up to your theme to provide it all. If you provide a link to your site I can see what’s not working.

    bdd

    @bws-online

    Thanks. As you’ve already marked this, we’ll consider it resolved at this point.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Styling posts with CSS’ is closed to new replies.
Skip to toolbar