{"id":311,"date":"2016-04-07T09:39:28","date_gmt":"2016-04-07T09:39:28","guid":{"rendered":"http:\/\/angelwings.net\/blog\/?p=311"},"modified":"2016-04-07T09:39:28","modified_gmt":"2016-04-07T09:39:28","slug":"wordpress-disable-product-arrow-pop-out-woocommerce-custom-posts-jupiter-theme","status":"publish","type":"post","link":"https:\/\/angelwings.net\/blog\/wordpress-disable-product-arrow-pop-out-woocommerce-custom-posts-jupiter-theme\/","title":{"rendered":"WordPress: Disable product arrow pop-out (woocommerce, custom posts, Jupiter theme)"},"content":{"rendered":"<p>Source: https:\/\/wordpress.org\/support\/topic\/woocommerce-disable-product-arrow-pop-out<\/p>\n<p>Affects all custom posts<\/p>\n<p>Question:<\/p>\n<p>Hi,<\/p>\n<p>I&#8217;m using WooCommerce (latest) with my Jupiter theme plugin.<\/p>\n<p>I can&#8217;t find the option to disable WooCommerce recommending other items on the side of the page.<\/p>\n<p>See this screenshot for an example.<\/p>\n<p>Can anyone help me remove this option? Thanks<\/p>\n<p>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.<\/p>\n<p>$output = &#8221;; \/\/added to remove the prev\/next post navigation<\/p>\n<blockquote><p>\/**<br \/>\n* Adds Next\/Previous post navigations to single posts<br \/>\n*<br \/>\n*\/<\/p>\n<p>function mk_post_nav($same_category = true, $taxonomy = &#8216;category&#8217;)<br \/>\n{<\/p>\n<p>global $mk_options;<\/p>\n<p>if(is_singular(&#8216;portfolio&#8217;) &amp;&amp; $mk_options[&#8216;portfolio_next_prev&#8217;] != &#8216;true&#8217;) return false;<\/p>\n<p>if(is_singular(&#8216;post&#8217;) &amp;&amp; $mk_options[&#8216;blog_prev_next&#8217;] != &#8216;true&#8217;) return false;<\/p>\n<p>$options = array();<br \/>\n$options[&#8216;same_category&#8217;] = $same_category;<br \/>\n$options[&#8216;excluded_terms&#8217;] = &#8221;;<\/p>\n<p>$options[&#8216;type&#8217;] = get_post_type();<br \/>\n$options[&#8216;taxonomy&#8217;] = $taxonomy;<\/p>\n<p>if(!is_singular() || is_post_type_hierarchical($options[&#8216;type&#8217;]))<br \/>\n$options[&#8216;is_hierarchical&#8217;] = true;<br \/>\nif($options[&#8216;type&#8217;] === &#8216;topic&#8217; || $options[&#8216;type&#8217;] === &#8216;reply&#8217;)<br \/>\n$options[&#8216;is_bbpress&#8217;] = true;<\/p>\n<p>$options = apply_filters(&#8216;mk_post_nav_settings&#8217;, $options);<br \/>\nif(!empty($options[&#8216;is_bbpress&#8217;]) || !empty($options[&#8216;is_hierarchical&#8217;]))<br \/>\nreturn;<\/p>\n<p>$entries[&#8216;prev&#8217;] = get_previous_post($options[&#8216;same_category&#8217;], $options[&#8216;excluded_terms&#8217;], $options[&#8216;taxonomy&#8217;]);<br \/>\n$entries[&#8216;next&#8217;] = get_next_post($options[&#8216;same_category&#8217;], $options[&#8216;excluded_terms&#8217;], $options[&#8216;taxonomy&#8217;]);<\/p>\n<p>$entries = apply_filters(&#8216;mk_post_nav_entries&#8217;, $entries, $options);<br \/>\n$output = &#8220;&#8221;;<\/p>\n<p>foreach ($entries as $key =&gt; $entry)<br \/>\n{<br \/>\nif(empty($entry)) continue;<\/p>\n<p>$post_type = get_post_type($entry-&gt;ID);<\/p>\n<p>$icon = $post_image = &#8220;&#8221;;<br \/>\n$link = get_permalink($entry-&gt;ID);<br \/>\n$image = get_the_post_thumbnail($entry-&gt;ID, &#8216;thumbnail&#8217;);<br \/>\n$class = $image ? &#8220;with-image&#8221; : &#8220;without-image&#8221;;<br \/>\n$icon = ($key == &#8216;prev&#8217;) ? &#8216;<i class=\"mk-icon-long-arrow-left\"><\/i>&#8216; : &#8216;<i class=\"mk-icon-long-arrow-right\"><\/i>&#8216;;<br \/>\n$output .= &#8216;<a class=\"mk-post-nav mk-post-'.$key.' '.$class.'\" href=\"'.$link.'\">&#8216;;<\/a><\/p>\n<p>$output .= &#8216;<span class=\"pagnav-wrapper\">&#8216;;<br \/>\n$output .= &#8216;<span class=\"pagenav-top\">&#8216;;<\/span><\/span><\/p>\n<p>$icon = &#8216;<span class=\"mk-pavnav-icon\">&#8216;.$icon.&#8217;<\/span>&#8216;;<\/p>\n<p>if($image) {<br \/>\n$post_image = &#8216;<span class=\"pagenav-image\">&#8216;.$image.&#8217;<\/span>&#8216;;<br \/>\n}<\/p>\n<p>$output .= $key == &#8216;next&#8217; ? $icon.$post_image : $post_image.$icon;<br \/>\n$output .= &#8220;&#8221;;<\/p>\n<p>$output .= &#8216;<\/p>\n<div class=\"nav-info-container\">&#8216;;<br \/>\n$output .= &#8216;<span class=\"pagenav-bottom\">&#8216;;<\/span><\/div>\n<p>$output .= &#8216;<span class=\"pagenav-title\">&#8216;.get_the_title($entry-&gt;ID).&#8217;<\/span>&#8216;;<\/p>\n<p>if($post_type == &#8216;post&#8217;) {<br \/>\n\/\/$output .= &#8216;<span class=\"pagenav-category\">&#8216;.get_the_category_list( &#8216;, &#8216;, &#8216;single&#8217;, $entry-&gt;ID ).&#8217;<\/span>&#8216;;<\/p>\n<p>} elseif ($post_type == &#8216;portfolio&#8217;) {<br \/>\n$terms = get_the_terms($entry-&gt;ID, &#8216;portfolio_category&#8217;);<br \/>\n$terms_slug = array();<br \/>\n$terms_name = array();<br \/>\nif (is_array($terms)) {<br \/>\nforeach($terms as $term) {<br \/>\n$terms_name[] = $term-&gt;name;<br \/>\n}<br \/>\n}<br \/>\n$output .= &#8216;<span class=\"pagenav-category\">&#8216;.implode(&#8216;, &#8216;, $terms_name).&#8217;<\/span>&#8216;;<br \/>\n} elseif ($post_type == &#8216;product&#8217;) {<br \/>\n$terms = get_the_terms($entry-&gt;ID, &#8216;product_cat&#8217;);<br \/>\n$terms_slug = array();<br \/>\n$terms_name = array();<br \/>\nif (is_array($terms)) {<br \/>\nforeach($terms as $term) {<br \/>\n$terms_name[] = $term-&gt;name;<br \/>\n}<br \/>\n}<br \/>\n$output .= &#8216;<span class=\"pagenav-category\">&#8216;.implode(&#8216;, &#8216;, $terms_name).&#8217;<\/span>&#8216;;<br \/>\n} elseif($post_type == &#8216;news&#8217;){<br \/>\n$terms = get_the_terms($entry-&gt;ID, &#8216;news_category&#8217;);<br \/>\n$terms_slug = array();<br \/>\n$terms_name = array();<br \/>\nif (is_array($terms)) {<br \/>\nforeach($terms as $term) {<br \/>\n$terms_name[] = $term-&gt;name;<br \/>\n}<br \/>\n}<br \/>\n$output .= &#8216;<span class=\"pagenav-category\">&#8216;.implode(&#8216;, &#8216;, $terms_name).&#8217;<\/span>&#8216;;<br \/>\n}<br \/>\n$output .= &#8220;&#8221;;<br \/>\n$output .= &#8221;<\/p>\n<p>&#8220;;<br \/>\n$output .= &#8220;&#8221;;<br \/>\n$output .= &#8220;&#8221;;<br \/>\n}<br \/>\necho $output;<br \/>\n}<br \/>\nadd_action( &#8216;wp_footer&#8217;, &#8216;mk_post_nav&#8217; );<\/p>\n<p>function mk_get_fontfamily( $element_name, $id, $font_family, $font_type ) {<br \/>\n$output = &#8221;;<br \/>\nif ( $font_type == &#8216;google&#8217; ) {<br \/>\nif ( !function_exists( &#8220;my_strstr&#8221; ) ) {<br \/>\nfunction my_strstr( $haystack, $needle, $before_needle = false ) {<br \/>\nif ( !$before_needle ) return strstr( $haystack, $needle );<br \/>\nelse return substr( $haystack, 0, strpos( $haystack, $needle ) );<br \/>\n}<br \/>\n}<br \/>\nwp_enqueue_style( $font_family, &#8216;\/\/fonts.googleapis.com\/css?family=&#8217; .$font_family.&#8217;:300italic,400italic,600italic,700italic,800italic,400,300,800,700,600&#8242; , false, false, &#8216;all&#8217; );<br \/>\n$format_name = strpos( $font_family, &#8216;:&#8217; );<br \/>\nif ( $format_name !== false ) {<br \/>\n$google_font = my_strstr( str_replace( &#8216;+&#8217;, &#8216; &#8216;, $font_family ), &#8216;:&#8217;, true );<br \/>\n} else {<br \/>\n$google_font = str_replace( &#8216;+&#8217;, &#8216; &#8216;, $font_family );<br \/>\n}<br \/>\n$output .= &#8216;<\/p>\n<p>&#8216;;<\/p>\n<p>} else if ( $font_type == &#8216;fontface&#8217; ) {<\/p>\n<p>$stylesheet = FONTFACE_DIR.&#8217;\/fontface_stylesheet.css&#8217;;<br \/>\n$font_dir = FONTFACE_URI;<br \/>\nif ( file_exists( $stylesheet ) ) {<br \/>\n$file_content = file_get_contents( $stylesheet );<br \/>\nif ( preg_match( &#8220;\/@font-face\\s*{[^}]*?font-family\\s*:\\s*(&#8216;|\\&#8221;)$font_family\\\\1.*?}\/is&#8221;, $file_content, $match ) ) {<br \/>\n$fontface_style = preg_replace( &#8220;\/url\\s*\\(\\s*[&#8216;|\\&#8221;]\\s*\/is&#8221;, &#8220;\\$font_dir\/&#8221;, $match[0] ).&#8221;\\n&#8221;;<br \/>\n}<br \/>\n$output = &#8220;\\n<\/p>\n<p>&#8216;;<br \/>\n}<\/p>\n<p>} else if ( $font_type == &#8216;safefont&#8217; ) {<br \/>\n$output .= &#8216;<\/p>\n<p>&#8216;;<br \/>\n}<\/p>\n<p>return $output;<br \/>\n}<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/wordpress.org\/support\/topic\/woocommerce-disable-product-arrow-pop-out Affects all custom posts Question: Hi, I&#8217;m using WooCommerce (latest) with my Jupiter theme plugin. I can&#8217;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 Removed this by going to my wp-content\/themes\/jupiter\/framework\/functions\/general-functions.php [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[81,131],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-cms","tag-jupiter","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":0,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}