I am envisioning a way to add a woocommerce shortcode to the listings page in the user dashboard or into its own “page” (not preferred). For this last option I understand I could add a link to the user menu, but can’t figure out what template to modify (custom) or what hook to add.
For the first option, is there a way to just use a filter to add a short code under the list of listing a user has under his account? TIA!
Thank you for waiting. Please try this PHP code snippet.
add_filter(
'hivepress/v1/templates/listings_edit_page',
function( $template ) {
return hivepress()->template->merge_blocks(
$template,
[
'page_content' => [
'blocks' => [
'custom_account_listings_shortcode' => [
'type' => 'content',
'content' => do_shortcode('[any_shortcode_here]'),
'_order' => 30,
],
],
],
]
);
},
1000
);
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.