Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to change featured background img URL by category

  • I’m trying to figure out how to change the featured background image between my Gallery category and Journal category on my blog, formyfelix.com. I am using the Lens theme, and when I go to that theme’s preview on GeneratePress, I can see that the Gallery and Journal categories have different featured background images. I have gone into the Elements section and the Gallery Loop Template is there where I go to change the img URL for the background. But it appears I only have the option to change the one image. I’ve looked around and it doesn’t appear as though I have a Journal loop template that allows me set an image that is specific to it.

    Is there an easy way for me to clone the Gallery loop template and then change the parameters to make a Journal loop template? And pardon for me silly questions as I am still very new to GeneratePress and GenerateBlocks.

  • Hi there,

    I’ve looked around and it doesn’t appear as though I have a Journal loop template that allows me set an image that is specific to it.

    All other categories including Journal are using the same loop template called Archive loop template, you can change the image there.

  • Hello Ying,

    Thanks for the response. Actually, it appears that the Gallery and the Journal categories are using the Gallery loop template, not the Archive loop template. I say that because when I change the image in the Gallery loop template, that’s when it changes it for both the Gallery category and the Journal Category.

    What I’m trying to figure is how to I use a different image for each of the categories? Do I need to create separate loop templates? And if so, are you able to inform me on how to do so?

    Thanks again for the help.

  • That’s not the default Lens template setup.

    In the original template, the Gallery category is using the Galery loop template:
    https://app.screencast.com/WLE6vG68Vc0Pa

    The Journal category is the Archive loop template:
    https://app.screencast.com/SJCxXYsEUEqsn

    What I’m trying to figure is how to I use a different image for each of the categories? Do I need to create separate loop templates? And if so, are you able to inform me on how to do so?

    You will need to create a block element – loop template for each category archive and switch out the image.

    For a quick start, you can copy the entire content and paste it into a new block element – loop template.

    Here’s a video shows how to copy/paste content in block editor:https://youtu.be/CsT1UOzZUgI?si=dsAS1FA3224qLT4m

  • Well shucks! I’m not sure how I ended up doing that. Is there any way I can have the Journal category use the Archive loop template again?

  • Yes, edit the Archive loop template, and make sure the location is setup like this:
    https://app.screencast.com/w3kQOgxTSEkJj

    Then edit the Gallery loop template, and set the location like this:
    https://app.screencast.com/uGcOvvELuEVk3

  • Thanks so much for these screenshots Ying. There only one problem left. For some reason, the name of the category shows up for the “Gallery” section, but it doesn’t show up for the “Journal” section. Is there something I missed? Here is the URL: https://formyfelix.com/category/journal/

  • Hi there,

    the Query Loop in the GP loop template element for the Gallery; what Parameters does it have set ?

  • It has a simple location rule that sets it to Post Category Archive = Gallery. I’ve changed the Archive loop to be Post Category Archive = Journal, but the title still doesn’t come up. 🙁

    Is there anything else I might be missing?

  • Can you provide an admin login so we can check the backend?

    Please edit your first post on this topic, and add the credential info into the private info field. It will only be seen by the support team.

  • Hi Ying and David,

    My apologies as it turns out the only reason it wasn’t coming up is because I didn’t have a post published in the Journal section. As soon as I published one, the category title popped up!

    Thanks again for everything. I will close this ticket.

  • Awesome! Glad to hear that 🙂

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