Viewing 5 replies - 1 through 5 (of 5 total)
  • This can be done using a custom css plugin. All you have to do is either use firebug if you use firefox, or developer tools if you use chrome, and find the article tag that contains the post you want. It will have a class on it of “post-POSTNUMBER” (POSTNUMBER being an actual number) and you can use that as a selector to have styles for only that post.

    Thread Starter korbakis

    (@korbakis)

    Thanks for the answer!

    But I meant I want to change them for all the posts…

    Can I do that by adding css in the child theme featured file?

    So for a single post do you just mean the single post view?

    You would just look at the CSS that is declaring the font/colour/whatever you want to change, and add body.post in front of it and then add your changes.

    Thread Starter korbakis

    (@korbakis)

    Yes, I know that, but the code is so big ??

    I want to change the fonts, the font size and the font colour in the single post view.

    Could you pls share some code? ?? Or somebody else who knows the exact code ??

    Thanks!

    @korbakis – when you inspect the elements on a post page using firebug or developer tools you’ll find the post id in the body tag, similar to this:

    <body class="single single-post postid-56

    You could then use something similar to this to style some/most of the content of that post:

    .post-id-56 .content, .post-id-56 .sidebar .widget {
      font-family: Georgia, serif;
      font-size: 32px;
      color: #f00;
      }

    Depending on which theme options or plugins and widgets you have active you may also have to target individual headings or content to override the default styles. For example, to style the post navigation at the top of the left sidebar you would do this:

    .post-id-56 .post-nav li a span {
      font-size: 15px;
      color: #f00;
    }

    Hope that helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I change fonts, fonts colors and fonts size in single post?’ is closed to new replies.