Hi!
I guess that this plugin has a hook to the category page.
But Woostify doesn’t use default hook on this page.
Can I know what is the default hook that plugin is using?
Then I can give you the custom hook name.
Thanks!
Thread Starter
Zokiu
(@zokiu)
The plugin developer provided a solution. It doesn’t seem to work.
add_filter( 'seo_for_wc_display_details_hook', 'wpm_display_details_hook' );
/**
* Filter the hook used to display the Details field.
*
* @param string $action_hook Existing hook.
* @return string Amended hook
*/
function wpm_display_details_hook( $action_hook ) {
$action_hook = 'your_new_hook';
return $action_hook;
}
Thread Starter
Zokiu
(@zokiu)
The code above should help.
Any edit of the theme that could make this work? 🙂
Can you try to add this code to the child theme?
add_filter( 'seo_for_wc_display_details_hook', 'wpm_display_details_hook' );
/**
* Filter the hook used to display the Details field.
*
* @param string $action_hook Existing hook.
* @return string Amended hook
*/
function wpm_display_details_hook( $action_hook ) {
$action_hook = 'woocommerce_before_shop_loop';
return $action_hook;
}
Thread Starter
Zokiu
(@zokiu)
Unfortunately, it doesn’t seem to display it… :/
Maybe the hook is wrong?
Hi! Please try this
add_filter( 'seo_for_wc_display_details_hook', 'wpm_display_details_hook' );
/**
* Filter the hook used to display the Details field.
*
* @param string $action_hook Existing hook.
* @return string Amended hook
*/
function wpm_display_details_hook( $action_hook ) {
$action_hook = 'woocommerce_archive_description';
return $action_hook;
}
It’s the right hook and if it still doesn’t work, please try to contact your plugin author.