-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-flick-of-the-week.php
executable file
·59 lines (50 loc) · 1.38 KB
/
page-flick-of-the-week.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* The template for displaying all single posts.
*
* @package storefront
*/
function modify_wc_actions()
{
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
remove_action('woocommerce_after_single_product_summary', 'show_reviews', 15);
remove_action('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
}
function get_content()
{
ob_start();
while (have_posts()) {
the_post();
do_action('storefront_single_post_before');
get_template_part('content', 'single-product');
do_action('storefront_single_post_after');
}
$html = ob_get_contents();
ob_end_clean();
return $html;
}
function get_menu()
{
ob_start();
wp_nav_menu(array(
'theme_location' => 'theblockwatch',
'menu_class' => 'page-submenu'
));
$menu = ob_get_contents();
ob_end_clean();
return $menu;
}
modify_wc_actions();
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?=get_menu()?>
<?=get_content()?>
</main>
</div>
<?php
do_action('storefront_sidebar');
get_footer();