• I’ve got a theme now (Frontier) that enables me to add CSS code to style elements within it. The problem is I can’t figure out how to style posts and widgets as each one has an ID that has a numeric tag attached to the end of “post” or “text.” How do you manipulate these as a whole without having to specify each individual post?

Viewing 1 replies (of 1 total)
  • Brian

    (@briansteeleca)

    All posts should also share a common class that you can target. For example:

    <article class="post-75 post type-post status-publish">

    In this example, the posts are identified with classes (rather than an ID). To target this specific post and make the text red, you would do this in your CSS:

    .post-75 {
        color: red;
    }

    If you wanted to target all posts, you would use the common class that all posts share:

    .post {
        color: red;
    }

    Your theme may use different classes, but the key is to target the class that is shared by all posts. Give it a try and if you still need help, let me know your site’s domain and I’ll have a look.

Viewing 1 replies (of 1 total)
  • The topic ‘Styling Elements’ is closed to new replies.