Skip Navigation

[Resolved] WordPress Archive overriding Genesis HTML structure

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by ellenB 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1214002
GenesisHooksMissingContent.png
GenesisHooksInContent.png

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 hidden link

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?

#1214061

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/

#1214447
GenesisMissingHooksInContent.png

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?

#1214514

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

#1219144

I made it work with Javascript by adding content to the div with the "woocommerce-notices-wrapper" class.

#1219147

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.