• Resolved juliavbh

    (@juliavbh)


    Hi — I have several sites using Hestia, both free and paid versions. I’d like to change the background color of an entire post — for example, I’d like the general site template to be black text on white bg, but for some photo gallery posts, I want a black background behind the images. What would be the best way to do this? I just need it for a few pages/posts.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Can you please share a link URL of where you want these changes? And screenshots of the areas you want it.

    Thank you!

    Thread Starter juliavbh

    (@juliavbh)

    Here is a page that is a good example: https://pierrepicot.com/gallery/ink-drawings/

    In this case, I’d like to change color of the white background behind the lightbox gallery (the whole content area, over the image background). I’d also like to change the header text in a similar way, so it could be a different color, say, for each gallery.

    (note – tried to add a screenshot, but it doesn’t seem to be displaying)

    • This reply was modified 4 months ago by juliavbh.
    mara3

    (@mara3)

    Hi @juliavbh ,

    In order to change the background color of each post and each header, you would have to identify the particular id of the posts.
    For that you can either use the inspect function on your website then click on the far upper left symbol (the one with an arrow and a dotted square) -> click on the element you would like to change the color for, and explore the code to identify its id.
    Another method would be to go to Dashboard -> Posts -> hover on the posts you would like to modify and in the bottom left corner an URL will appear, something like – https://[…%5D/wp-admin/post.php?post=51&action=edit, here “post_51” is the id.

    After finding the id of the specific post you will need to go to the Customizer -> Additional CSS and add this code there:

    .postid-51 .blog-post-wrapper {
    background-color: [desired_color] !important;
    }


    To change the background of the post, and this code:

    .postid-51 .entry-title { color: [desired_color];}

    to change the color of the title.

    Remember to replace “postid-51” with the actual id of your post.

    I hope this helps!

    Kind regards,

    Mara

    • This reply was modified 4 months ago by mara3.
    Thread Starter juliavbh

    (@juliavbh)

    Thank you so much, that worked perfectly! Should I be moving my code from the Customizer field to a child theme eventually? (I’ve always just left it there, but have heard that it’s not the best practice.)

    mara3

    (@mara3)

    Hi @juliavbh,

    I’m glad to hear that you achieved the behaviour you intended!

    It is indeed the best practice to have a child theme to prevent all your work from being overwritten by an update. You can read more about a child theme here, and if you decide to install one for Hestia, this doc can help you – https://docs.themeisle.com/article/656-how-to-create-a-child-theme-for-hestia.

    Best regards,

    Mara

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