Reply To: Blog Page Header in Categories

Home Forums Support Blog Page Header in Categories Reply To: Blog Page Header in Categories

#164152
Tom
Lead Developer
Lead Developer

Hi Andreas,

Unfortunately there’s no page created for categories, so there’s no where for us to add the options.

However, you could use GP Hooks to accomplish this.

More info here: https://generatepress.com/forums/topic/gp-hooks-2/

For example, in the “After Header” hook, you could do something like this:

<?php if ( is_category( 'Category Name' ) ) : ?>
      <div class="page-header-image grid-container grid-parent generate-page-header">
            <img src="URL TO YOUR CATEGORY HEADER IMAGE" alt="" itemprop="image">
      </div>
<?php endif; ?>

Then check the “Execute PHP” checkbox and change the “Category Name” and src to your specific values.

Hope this helps 🙂