WordPress.org

Ready to get started?Download WordPress

Forums

How to Style Each WordPress Post Differently (3 posts)

  1. abdullahcakmak
    Member
    Posted 9 months ago #

    hey guys,

    I have a hosted WordPress blog and i want to customize the look by giving every post category a different color.

    By that i mean the post-metadata background of category music lets say i want to be green and science yellow or something. At the same time i want to make links in the category section on the sidebar the same color as the post-metadata background of the same category on the content area.

    And are there more methods to apply that styling to other sections of the website?

    http://musavver.com/ is my domain

    Is there some one that can help me ?

    Thanks

  2. paulwpxp
    Font hero
    Posted 9 months ago #

    Most, if not all, WP themes hosted here at WP.org come implemented with WP standard body class and post class.

    http://codex.wordpress.org/Function_Reference/body_class

    http://codex.wordpress.org/Function_Reference/post_class

    We can make use of those generated classes to target any elements in many different pages.

  3. You could also make use of the WordPress Template Hierarchy to make a different template for each term.

    If you have only a few terms and you want the style and layout of the pages to be very different from each other this may be a good way to go. However, if you have a lot of terms and you just want to change colors, the technique above using body classes is more efficient.

Reply

You must log in to post.

About this Topic