Site logo

[Resolved] Make page hero retina-ready

Home Forums Support [Resolved] Make page hero retina-ready

Home Forums Support Make page hero retina-ready

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #1826764
    David
    Staff
    Customer Support

    Glad to be of help – and thanks for the great feedback!

    #1855017
    mkjj

    Hi again,

    yesterday, I ran into one minor problem using this solution. It works awesome for pages, but not for the blog page, archive pages, single posts etc.

    Let’s say, I want to make the header element for the blog page retina-ready. I could modify the function like so

    if( is_page() || is_home() ) {...

    However, this will grab the featured image of the first post and not of the blog page itself. I know, I could use CSS like so:

    .blog .page-hero, .archive .page-hero, .single-post .page-hero {...}

    Is there a more elegant solution for this? It’s not a big deal, since the same hero image is used for these pages. So, the CSS solution would be fine, but I just wanted to ask anyway.

    #1855237
    David
    Staff
    Customer Support

    Yeah, theres no simple ‘dynamic’ solution for that. The CSS method would be the best way to go.

    #1855244
    mkjj

    Thanks, David. That’s ok, since the same image is used for several pages.

    #1855327
    David
    Staff
    Customer Support

    You’re welcome

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.