Support » Theme: Astra » Select Pages with Featured Image Disabled

  • sprockettechweb

    (@sprockettechweb)


    Is there a way to target pages that have the “Disable Featured Image” ticked in CSS? I didn’t spot a corresponding class or ID, but hoping maybe there is one that I can utilize? TIA.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi @sprockettechweb ,

    We have used .ast-no-thumbnail class on posts and pages when you disable the featured image in a post and page.

    Regards,
    Deepak

    Thank you, however I do not see .ast-no-thumbnail or anything similar appearing in the source code for pages.

    Hi @sprockettechweb,

    When you disable featured image from Astra Settings, CSS class “.ast-no-thumbnail” will be added to the source code.

    In case you are facing difficulty in finding it please open a support ticket at our portal and provide more details. We will take a closer look and assist you with necessary solution.

    Regards,
    Anjali

    Yes, but where should it appear in the code? Because I cannot find it anywhere.

    Hi @sprockettechweb,

    It will appear in the source code of the page. If you could open a page and inspect it you will see CSS class or view the source code (Ctrl + U) of the page and search for the class.

    You can write a CSS with this class as –
    .ast-no-thumbnail{
    /* Add CSS here */
    }

    Hope that helps!

    Regards,
    Anjali

    I know how to view the source code and I know how to use CSS. I am not finding the class in the code when I search. Which element should the class be attached to? It seems to be missing.

    Ah, figured it out. If you tick ‘Disable Title’ as well, the ast-no-thumbnail class (and ast-no-title) will not show. Perhaps this is a bug or the class should be displayed on a higher level element?

    Hi @sprockettechweb ,

    Glad that you figured out. Just to let you know that when you do not have any featured image in your post then our theme does not append its class.

    This is not a bug, actually its the way we have added our classes to the WordPress default elements.

    Regards
    Deepak

    That’s not the behavior I described. If I tick just the Disable Featured Image by itself the class appears, whether I have a featured image or not. Same goes for the Disable Title box, by itself. However, if both are ticked, neither of the classes appear.

    Hi @sprockettechweb,

    ast-no-thumbnail and ast-no-title classes will appear in following combinations –
    1. Title/Image not set
    2. Title/Image disbaled with Astra options

    As I checked, when we disable both options, their respective classes still appear in the source code.

    Let me know if you have further queries with this Or open a support ticket from here and submit detailed information about the issue.

    Regards,
    Anjali

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