[Resolved] Add class when disable feature image

Home Forums Support [Resolved] Add class when disable feature image

Home Forums Support Add class when disable feature image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2356312
    Gonzalo

    Hi there,
    I would like to add a special class, only to the posts that set the featured image disabled.
    Can you help me?

    #2357064
    Fernando
    Customer Support

    Hi Gonzalo,

    What are you planning to do?

    There’s a class that’s added or removed – featured-image-active – depending if the feature image is enabled or not.

    You can use the existence or non existence of this class with your code.

    #2357576
    Gonzalo

    Hi Fernando,
    I need add class, when featured image it’s disabled.
    e.g.
    `.my-class .featured-image-disabled {margin-top:50px;}

    I guess that class doesn’t exist. Maybe with a PHP condition?

    #2358044
    Ying
    Staff
    Customer Support

    You can use body:not(.featured-image-active).

    #2358071
    Gonzalo

    Great, thank you Ying!

    #2358112
    Ying
    Staff
    Customer Support

    No problem 🙂

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