WordPress.org

Support

Support » How-To and Troubleshooting » How to style posts?

How to style posts?

  • How would I style the posts in the loop? For example if I wanted each post in my blog to have a gray box surrounded the post?

    Don’t know if it’s relevant but I’m using twenty eleven for theme.

    But even if that’s the case how would you style it in general?

    Also would I be able to style everything in the post itself?

Viewing 6 replies - 1 through 6 (of 6 total)
  • peredur
    Participant

    @peredur

    You would probably use Firebug to find out what the name of the block element in which the post content lived was, and then style that via CSS. There will probably be more than one candidate, but you can use Firebug to test the different choices out to see which one works best for you.

    Since you mention the twentyeleven theme, I should say that you really must make all your alterations to any default theme in a Child Theme.

    HTH

    PAE

    Definitely, all my changes are a child theme. What would be nice if there was a specific way to find the loop area. I’ve tried that before but I guess I need to take another look maybe I’m missing something. Hopefully there is something that I missed. Thanks!

    Josh
    Participant

    @josh401

    What’s the URL.

    This should be able to be accomplished pretty easily using custom CSS.

    D Chad
    Member

    @cdahlstrom

    Hi,

    The loop can be within the php template file or an external loop.php file that is included. Look in single.php or related templates that end in loop or single .php. From there you should see the CSS class that is styling the post. As Josh noted we can find it by looking at the site too as the class will be printed in the markup via view source, fire bug etc.. You can style them all or even do unique templates for different categories.

    Hope that helps.

    Cheers,
    Chad

    Ligia Ulloa
    Member

    @ligia-ulloa

    Hi, everyone.
    I am new to wordpress and I am building a website http://www.jesusjpena.com. I am following a tutorial on Lynda, but I am stuck on the part of how to design the blog homepage and the post. I need to use CSS but I do know the general code to apply to all posts?

    Please I would appreciate if someone can help me?

    Michael
    Forum Moderator

    @alchymyth

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to style posts?’ is closed to new replies.