In the code below, I inserted a php block "shop_content" within a WordPress hook. In the output, as it should, the inserted php block shows up before the woocommerce_single_product_summary
hook. So, "shop_content" shows up before the h1 title. My goal is to get the title above the shop_content, essentially adding custom html into a WordPress hook. I'm wondering if there is a way I can rearrange this hook without resorting to jQuery to reorder the divs? I'm viewing this hook guide as reference.
<div class="<?php echo esc_attr($ozark_product_summary_class) ?>">
<div class="summary entry-summary gs-product-summary">
<?php
/**
* Product Title
*/
if (ozark_inherit_option('general_title', 'general_title_product', '1') == '2') {
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
}?>
<?php if ( is_active_sidebar( 'shop_content' ) ) : ?>
<div id="shop_description" class="shop-description widget-area" role="complementary">
<?php dynamic_sidebar( 'shop_content' ); ?>
</div>
<?php endif; ?>
<?php
/**
* Hook: woocommerce_single_product_summary.
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
* @hooked WC_Structured_Data::generate_product_data() - 60
*/
// remove product short description
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 6);
do_action('woocommerce_single_product_summary');
?>
<?php if (get_theme_mod('product_share', '2') == '1') : ?>
<?php get_template_part('templates/extra/share') ?>
<?php endif; ?>
</div>
</div>