🎉 Happy 4th of July! Get 15% off GP Premium with the discount code: 4THOFJULY2020

[Resolved] hide subsequent featured images

Home Forums Support hide subsequent featured images

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1170004
    anand

    how to disable or hide featured images in subsequent posts – when using ajax load more to show posts one below the other.(show in the first post… not show in 2,3.. posts)

    tried this css
    .page-header-image-single:nth-of-type(1n+2) {
    display: none;
    }

    but no help.

    #1170233
    David
    Staff
    Customer Support

    Hi there,

    unfortunately nth-of-type and the other pseudo selectors don’t apply to CSS classes.

    However, if we look at your HTML each article is displayed within a alm-reveal wrapper – creating a list of common elements with that class and we can target them like so:

    .alm-reveal:nth-child(2n+1) .page-header-image-single {
        display: none;
    }

    I am not sure the formula is correct for your requirements but give that a short to start with

    #1170471
    anand

    Thanks a lot…

    but this code worked for me

    .alm-reveal:nth-child(1n+2) .page-header-image-single {
        display: none;
    }
    #1170525
    David
    Staff
    Customer Support

    Yeah i wasn’t sure that formula was correct 🙂

    Glad to be of help

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