Site logo

Archived topic

Search Box Above Product Categories (Target Theme)

7 replies · Started by Craig on October 2, 2022

Viewing posts 1–8 of 8

Is it possible to add a short code above the products in the product categories for the Target theme? I want to add a live search box that is inside a container. Thanks, I understand some CSS might need to be changed. This is not urgent just wondering about this.

[url=https://ibb.co/kHkPZZw][img]https://i.ibb.co/5MtJZZS/site.png[/img][/url]

https://geordiegadgets.co.uk/product-category/nintendo/

Hi Craig,

To clarify, are you referring to some sort of Search and Filter type of functionality in this location? https://share.getcloudapp.com/d5unNddW

If so, you would need a third party plugin for this. If it has a shortcode, you can try adding it through a Hook Element. It might be good to ask in our Facebook group for recommendations for such a plugin: https://www.facebook.com/groups/generatepress

Or if it's just a simple WordPress search? You can use a WP Search Block through a Block Element.

How do I add a hook element to this page I was thinking more of an advanced search feature like an advanced ajax search let's assume I found a search plugin but it wanted me to add it via a short code how would I do it on this type of page as it's not as easy as just editing it with the block editor like the home page. Thanks for your patience I am just very curious about possibilities for this theme.

Here is an example of a search from another website I understand this is likely a custom-coded website used in the example and likely does not run WordPress or woocommerce. Just using this search box as an example.

[url=https://ibb.co/9YbGGPt][img]https://i.ibb.co/5cr22ZF/search-example.png[/img][/url]

You can use a Hook Element displayed to Blog page. Set the hook to somewhere like generate_after_header, generate_before_main_content or somewhere else. You can refer to this Visual Guide for reference to some hooks you may use in the Blog page: https://docs.generatepress.com/article/hooks-visual-guide/

Thanks do you know what this page for the URL would be classed under for a hook eg. product catogorie? I have read this documentation and it seems very interesting I'll have to read it some more and become up to date it's good that you can use custom code with generate press. Not many themes have this option

Thanks for your help with hooks I'll give it a go

You're welcome Craig!

This archived topic is closed to new replies.