I am using Woocommerce, Toolset and a Genesis Theme. I have set up Toolset WordPress Archive templates for the related Woo archives. Using them deactivates some of the built in Genesis hooks, specifically the genesis_before_content hook. I need to insert my title bar between the breadcrumbs and the entire content (content + sidebar) like in the second screenshot (GenesisHooksInContent.png). The best I can do at the moment is inserting it in the Archive template before the content only (not the sidebar) (first screenshot, GenesisHooksMissingContent.png).
The page that I am specifically working with is enlace oculto
Can you help me either reactivate the Genesis hooks within the Toolset WordPress Archives or let me know what hook I can use to insert my content where I want it?
Hello,
There isn't such a built-in feature within Toolset plugins, It needs custom codes, for example, you can edit the specific theme file for rendering the the archive page, add some custom PHP codes to trigger the action hook "genesis_before_content", for example:
do_action( 'genesis_before_content', $arg );
More help:
https://developer.wordpress.org/reference/functions/do_action/
Yes, that's exactly what I am doing in other places on my site to add content (e.g. the title bar in the second screenshot, GenesisHooksInContent.png).
The issue is that the hook that I want to use (genesis_before_content) has been removed from the content area by the Toolset WordPress Archives.
I've attached another version of the first screenshot that will more clearly show this. This screenshot should have the same hooks on the page as GenesisHooksInContent.png screenshot but it doesn't.
How do I stop the Views plugin from removing the Genesis Hooks when using the WordPress Archive templates?
Views WordPress Archive works only in the content area, if you are using Views WordPress Archive to design the content area of archive page, the content area will be take over by Views WordPress Archive.
If the action hook "genesis_before_content" is within content area, as a result, it will not work(removed).
As I suggest you above, you need to locate the problem theme file, make sure if the "genesis_before_content" action is outside or insider content area of content area of archive page.
If it is insider content area, you might consider to create a custom shortcode, put this shortcode into Views WordPress Archive, use this shortcode to output "genesis_before_content" hook content.
More help:
https://codex.wordpress.org/Function_Reference/add_shortcode
I made it work with Javascript by adding content to the div with the "woocommerce-notices-wrapper" class.
My issue is resolved now. Thank you!