/** * Disable child page listing for Products page */ function graphene_wpsc_disable_child() { if (!is_products_page()) { return; } global $graphene_settings; $graphene_settings['child_page_listing'] = 'hide'; }
} echo "\n" . '<div class="content-wrap row">'; echo "\n\t" . '<div class="' . $NV_frame_main . ' skinset-main nv-skin columns twelve ' . $NV_main_divider . '">'; } /* ------------------------------------ :: BREADCRUMBS ------------------------------------ */ if (class_exists('BP_Core_User')) { if (!bp_is_blog_page()) { if (empty($NV_hidebreadcrumbs)) { $NV_hidebreadcrumbs = "yes"; } } } if (class_exists('WPSC_Query')) { if (get_post_type() == 'wpsc-product' || is_products_page()) { if (!wpsc_has_breadcrumbs()) { if (empty($NV_hidebreadcrumbs)) { $NV_hidebreadcrumbs = "yes"; } } } } if (is_front_page() || of_get_option('breadcrumb') == 'disable') { $NV_hidebreadcrumbs = 'yes'; } // Sub Header Display if ($NV_hidebreadcrumbs == 'yes' && (empty($NV_socialicons) || $NV_socialicons == 'off') && empty($NV_textresize)) { $NV_disable_subtabs = 'yes'; } else { $NV_disable_subtabs = '';
/** * wpsc_display_products_page function. * * @access public * @param mixed $query * @return void */ function wpsc_display_featured_products_page() { global $wp_query; $output = ''; $sticky_array = get_option('sticky_products'); if ((is_front_page() || is_home() || is_products_page()) && !empty($sticky_array) && $wp_query->post_count > 1) { $query = get_posts(array('post__in' => $sticky_array, 'post_type' => 'wpsc-product', 'orderby' => 'rand', 'numberposts' => 1, 'posts_per_page' => 1)); if (count($query) > 0) { $GLOBALS['nzshpcrt_activateshpcrt'] = true; $image_width = get_option('product_image_width'); $image_height = get_option('product_image_height'); $featured_product_theme_path = wpsc_get_template_file_path('wpsc-featured_product.php'); ob_start(); include_once $featured_product_theme_path; $is_single = false; $output .= ob_get_contents(); ob_end_clean(); //Begin outputting featured product. We can worry about templating later, or folks can just CSS it up. echo $output; //End output } } }
function is_a_page_containing_products() { global $post; $is_a_page_containing_products = false; if (get_post_type($post) == 'wpsc-product') { $is_a_page_containing_products = true; } if (function_exists('is_products_page') && !$is_a_page_containing_products) { if (is_products_page()) { $is_a_page_containing_products = true; } } return $is_a_page_containing_products; }