Source: https://wordpress.org/support/topic/woocommerce-disable-product-arrow-pop-out
I’m using WooCommerce (latest) with my Jupiter theme plugin.
I can’t find the option to disable WooCommerce recommending other items on the side of the page.
See this screenshot for an example.
Removed this by going to my wp-content/themes/jupiter/framework/functions/general-functions.php and adding this link to the end to remove the $output content.
/**
* Adds Next/Previous post navigations to single posts
*
*/
function mk_post_nav($same_category = true, $taxonomy = ‘category’)
{
global $mk_options;
if(is_singular(‘portfolio’) && $mk_options[‘portfolio_next_prev’] != ‘true’) return false;
if(is_singular(‘post’) && $mk_options[‘blog_prev_next’] != ‘true’) return false;
$options = array();
$options[‘same_category’] = $same_category;
$options[‘excluded_terms’] = ”;
$options[‘type’] = get_post_type();
$options[‘taxonomy’] = $taxonomy;
if(!is_singular() || is_post_type_hierarchical($options[‘type’]))
$options[‘is_hierarchical’] = true;
if($options[‘type’] === ‘topic’ || $options[‘type’] === ‘reply’)
$options[‘is_bbpress’] = true;
$options = apply_filters(‘mk_post_nav_settings’, $options);
if(!empty($options[‘is_bbpress’]) || !empty($options[‘is_hierarchical’]))
return;
$entries[‘prev’] = get_previous_post($options[‘same_category’], $options[‘excluded_terms’], $options[‘taxonomy’]);
$entries[‘next’] = get_next_post($options[‘same_category’], $options[‘excluded_terms’], $options[‘taxonomy’]);
$entries = apply_filters(‘mk_post_nav_entries’, $entries, $options);
$output = “”;
foreach ($entries as $key => $entry)
{
if(empty($entry)) continue;
$post_type = get_post_type($entry->ID);
$icon = $post_image = “”;
$link = get_permalink($entry->ID);
$image = get_the_post_thumbnail($entry->ID, ‘thumbnail’);
$class = $image ? “with-image” : “without-image”;
$icon = ($key == ‘prev’) ? ‘‘ : ‘‘;
$output .= ‘‘;
$output .= ‘‘;
$output .= ‘‘;
$icon = ‘‘.$icon.’‘;
if($image) {
$post_image = ‘‘.$image.’‘;
}
$output .= $key == ‘next’ ? $icon.$post_image : $post_image.$icon;
$output .= “”;
$output .= ‘
‘;
$output .= ‘‘;
$output .= ‘‘.get_the_title($entry->ID).’‘;
if($post_type == ‘post’) {
//$output .= ‘‘.get_the_category_list( ‘, ‘, ‘single’, $entry->ID ).’‘;
} elseif ($post_type == ‘portfolio’) {
$terms = get_the_terms($entry->ID, ‘portfolio_category’);
$terms_slug = array();
$terms_name = array();
if (is_array($terms)) {
foreach($terms as $term) {
$terms_name[] = $term->name;
}
}
$output .= ‘‘.implode(‘, ‘, $terms_name).’‘;
} elseif ($post_type == ‘product’) {
$terms = get_the_terms($entry->ID, ‘product_cat’);
$terms_slug = array();
$terms_name = array();
if (is_array($terms)) {
foreach($terms as $term) {
$terms_name[] = $term->name;
}
}
$output .= ‘‘.implode(‘, ‘, $terms_name).’‘;
} elseif($post_type == ‘news’){
$terms = get_the_terms($entry->ID, ‘news_category’);
$terms_slug = array();
$terms_name = array();
if (is_array($terms)) {
foreach($terms as $term) {
$terms_name[] = $term->name;
}
}
$output .= ‘‘.implode(‘, ‘, $terms_name).’‘;
}
$output .= “”;
$output .= ”
“;
$output .= “”;
$output .= “”;
}
echo $output;
}
add_action( ‘wp_footer’, ‘mk_post_nav’ );
function mk_get_fontfamily( $element_name, $id, $font_family, $font_type ) {
$output = ”;
if ( $font_type == ‘google’ ) {
if ( !function_exists( “my_strstr” ) ) {
function my_strstr( $haystack, $needle, $before_needle = false ) {
if ( !$before_needle ) return strstr( $haystack, $needle );
else return substr( $haystack, 0, strpos( $haystack, $needle ) );
}
}
wp_enqueue_style( $font_family, ‘//fonts.googleapis.com/css?family=’ .$font_family.’:300italic,400italic,600italic,700italic,800italic,400,300,800,700,600′ , false, false, ‘all’ );
$format_name = strpos( $font_family, ‘:’ );
if ( $format_name !== false ) {
$google_font = my_strstr( str_replace( ‘+’, ‘ ‘, $font_family ), ‘:’, true );
} else {
$google_font = str_replace( ‘+’, ‘ ‘, $font_family );
}
$output .= ‘
‘;
} else if ( $font_type == ‘fontface’ ) {
$stylesheet = FONTFACE_DIR.’/fontface_stylesheet.css’;
$font_dir = FONTFACE_URI;
if ( file_exists( $stylesheet ) ) {
$file_content = file_get_contents( $stylesheet );
if ( preg_match( “/@font-face\s*{[^}]*?font-family\s*:\s*(‘|\”)$font_family\\1.*?}/is”, $file_content, $match ) ) {
$fontface_style = preg_replace( “/url\s*\(\s*[‘|\”]\s*/is”, “\$font_dir/”, $match[0] ).”\n”;
}
$output = “\n
‘;
}
} else if ( $font_type == ‘safefont’ ) {
$output .= ‘
‘;
}
return $output;
}