- This topic has 9 replies, 4 voices, and was last updated 1 week, 1 day ago by Leo.
July 1, 2020 at 3:25 am #1347937Alfonso
I would like to know if a new widget area can be created. I would like to insert in my ecommerce a text and a photo on the category pages just below the category title. In my previous theme I did it by creating a new widget and placing it in the archive-product.php file in the position I wanted, and using a plugin it showed a different text and a photo for each category.
In this topic can it be done this way or is there some other way to do it?
Best regards.July 1, 2020 at 5:01 am #1348031DavidStaffCustomer Support
you can use Hooks to add elements and content to the theme templates.
For Woocommerce you can see all the available hooks here:
And the easiest way to use them is the Hook Element:
GP includes the list of all the Woo hooks.
let us know if that helps.July 1, 2020 at 7:24 am #1348183Alfonso
Thank you very much.
It’s just what i was looking for.
Best regards.July 1, 2020 at 8:35 am #1348437DavidStaffCustomer SupportJanuary 7, 2021 at 8:08 am #1609728Catherine
I’m looking to add a widget at the end of post/page content and wonder if this uses the ‘generate_after_entry_content’ hook? I don’t want the widget to show up in on the blog page, nor archives etc., just the content itself.
*edit*: would it actually be better to place it above ‘generate_before_footer’ hook? Would this produce less calls to the database and be a more efficient way to place a global widget for email sign ups, for example. I would still like to be able to add one at the end of a post for other purposes.*close edit*
I assume it would not matter how many widgets were used in this new area and that it would still be subject to the Jetpack visibility options?
CatherineJanuary 7, 2021 at 8:32 am #1609769DavidStaffCustomer SupportJanuary 7, 2021 at 8:59 am #1609824Catherine
I’m looking to place a global email sign up at the end of each post. I’m also looking to add a widget to certain posts, again at the end of content – book promos etc.
So the book promos would be custom html widget, Mailchimp already exists in the widget area. I think the Mailchimp sign up widget must be php? If that’s what you mean?January 7, 2021 at 10:42 am #1609934LeoStaffCustomer Support
The easiest method would be to use a plugin like this:
Then you can use the shortcode generated with hooks elements.
Please open a new topic if you need more help on this.
Thanks!January 7, 2021 at 5:29 pm #1610233Catherine
Thanks, though I found a plugin that creates a widget area after the content. Got my Mailchimp connect and their widget is sitting in there just fine.January 7, 2021 at 8:20 pm #1610343
- You must be logged in to reply to this topic.