[Resolved] Best way to apply css to a single blog post

Home Forums Support Best way to apply css to a single blog post

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #358702
    Eric

    Hello, I’m wondering if there’s an easy or ideal way to apply CSS only to a single page.

    Problem: I use a Table of Contents plugin that shows an expanded TOC at the top of an article. For most articles, this is desired, but one, in particular, has a rather long TOC and I’d like to auto hide it.

    I found the CSS code, but don’t know how to only apply it to that single post.

    Thanks in advance.

    GeneratePress 1.3.48
    GP Premium 1.3.1
    #358725
    Leo
    Staff
    Customer Support

    Hi Eric,

    Easiest way is to use Tom’s Simple CSS plugin.

    See explanation in this article: https://docs.generatepress.com/article/adding-css/#simple-css

    #358730
    Eric

    Thanks! I knew of that plugin, but didn’t realize it allowed for single post customization!

    #358739
    Leo
    Staff
    Customer Support

    No problem!

    Keep in mind that the meta box won’t work on index pages (blog, archive etc) but it should work well for posts 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.