[Resolved] Using featured-images.php in child theme

Home Forums Support [Resolved] Using featured-images.php in child theme

Home Forums Support Using featured-images.php in child theme

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2323694
    Drew

    I feel like this should be really easy, but I can’t seem to figure it out: I want to change how featured images are handled by editing the template output, so I’m trying to copy inc/structure/featured-images.php into my child theme, but it doesn’t seem to register there. My code changes work when I make them to the file in the parent/main GP theme, but not when I copy that file into the generatepress_child theme. I’ve tried putting it in the base child theme directory, in inc/structure and inc but none of that works. Thanks in advance for the support!

    #2323879
    Ying
    Staff
    Customer Support

    Hi there,

    Can you tell us how would you like to change the featured image?

    #2323929
    Drew

    I’m trying to create a hero banner using the featured image, the page title, and an ACF field. I could assuredly do it through Elementor or a similar theme builder, but I’m trying to avoid it unless I absolutely need to.

    The banner would look something like this, minus the button: http://rafaltomal.com/wp-content/uploads/2014/04/hero-9.jpg

    #2323976
    Ying
    Staff
    Customer Support

    You can achieve this using GP’s block element along with GenerateBlocks plugin.
    https://docs.generatepress.com/article/block-element-page-hero/

    The video in the link demonstrate how to create the block element page hero.

    Once the block element – page hero is created, you can use a header element to merge the header with content.
    Here’s an video demostration: https://youtu.be/TP8mgBQTgGg

    #2324784
    Drew

    Thanks for the tip. I was trying to avoid adding Yet Another Plugin when I knew I could just add a few lines of code to a theme template, but this works for now.

    #2324890
    Ying
    Staff
    Customer Support

    You are welcome 🙂

    GenerateBlocks is very useful for GP users, as GP’s block elements require GB to get the dynamic data.

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