[Woocommerce] Disable product arrow pop-out
-
Hi,
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.
Can anyone help me remove this option? Thanks
Viewing 1 replies (of 1 total)
-
Removed this by going to my theme/functions/general_functions.php and removing all of this:
/** * 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') ? '<i class="mk-icon-long-arrow-left"></i>' : '<i class="mk-icon-long-arrow-right"></i>'; $output .= '<a class="mk-post-nav mk-post-'.$key.' '.$class.'" href="'.$link.'">'; $output .= '<span class="pagnav-wrapper">'; $output .= '<span class="pagenav-top">'; $icon = '<span class="mk-pavnav-icon">'.$icon.'</span>'; if($image) { $post_image = '<span class="pagenav-image">'.$image.'</span>'; } $output .= $key == 'next' ? $icon.$post_image : $post_image.$icon; $output .= "</span>"; $output .= '<div class="nav-info-container">'; $output .= '<span class="pagenav-bottom">'; $output .= '<span class="pagenav-title">'.get_the_title($entry->ID).'</span>'; if($post_type == 'post') { //$output .= '<span class="pagenav-category">'.get_the_category_list( ', ', 'single', $entry->ID ).'</span>'; } 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 .= '<span class="pagenav-category">'.implode(', ', $terms_name).'</span>'; } 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 .= '<span class="pagenav-category">'.implode(', ', $terms_name).'</span>'; } 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 .= '<span class="pagenav-category">'.implode(', ', $terms_name).'</span>'; } $output .= "</span>"; $output .= "</div>"; $output .= "</span>"; $output .= "</a>"; } 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 .= '<style>'.$element_name.$id.' {font-family: "'.$google_font.'"}</style>'; } 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<style>" . $fontface_style ."\n"; $output .= $element_name.$id.' {font-family: "'.$font_family.'"}</style>'; } } else if ( $font_type == 'safefont' ) { $output .= '<style>'.$element_name.$id.' {font-family: '.$font_family.' !important}</style>'; } return $output; }
Viewing 1 replies (of 1 total)
- The topic ‘[Woocommerce] Disable product arrow pop-out’ is closed to new replies.