<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Sidebar on single product page &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/feed/</link>
		<description></description>
		<lastBuildDate>Mon, 13 Oct 2025 09:04:32 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167030</guid>
					<title><![CDATA[Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167030</link>
					<pubDate>Thu, 18 Dec 2014 14:10:16 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						<p>Hello</p>
<p>I have been trying to set a sidebar to my single Woocommerce product page, example here, <a href="http://trsnyr.endor.is/netverslun/lenovo-yoga-2-pro-13-3-spjaldtolva-32gb-android/" rel="nofollow">http://trsnyr.endor.is/netverslun/lenovo-yoga-2-pro-13-3-spjaldtolva-32gb-android/</a> but the other threads in the forum with custom code for functions.php do not work.</p>
<p>Any chance I can get help with this ?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167380</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167380</link>
					<pubDate>Fri, 19 Dec 2014 02:21:22 +0000</pubDate>
					<dc:creator>Nabeel A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Gretar,</p>
<p>Can you please share the code you&#8217;re trying for the sidebar with us, may be we can help you fixing it for your site.</p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167485</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167485</link>
					<pubDate>Fri, 19 Dec 2014 08:31:45 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						<p>This is the code</p>
<pre><code>if ( ! function_exists( &#039;x_get_content_layout&#039; ) ) :
  function x_get_content_layout() {

    $stack          = x_get_stack();
    $content_layout = x_get_option( &#039;x_&#039; . $stack . &#039;_layout_content&#039;, &#039;content-sidebar&#039; );

    if ( $content_layout != &#039;full-width&#039; ) {
      if ( is_home() ) {
        $opt    = x_get_option( &#039;x_blog_layout&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( is_singular( &#039;post&#039; ) ) {
        $meta   = get_post_meta( get_the_ID(), &#039;_x_post_layout&#039;, true );
        $layout = ( $meta == &#039;on&#039; ) ? &#039;full-width&#039; : $content_layout;
      } elseif ( x_is_portfolio_item() ) {
        $layout = &#039;full-width&#039;;
      } elseif ( x_is_portfolio() ) {
        $meta   = get_post_meta( get_the_ID(), &#039;_x_portfolio_layout&#039;, true );
        $layout = ( $meta == &#039;sidebar&#039; ) ? $content_layout : $meta;
      } elseif ( is_page_template( &#039;template-layout-content-sidebar.php&#039; ) ) {
        $layout = &#039;content-sidebar&#039;;
      } elseif ( is_page_template( &#039;template-layout-sidebar-content.php&#039; ) ) {
        $layout = &#039;sidebar-content&#039;;
      } elseif ( is_page_template( &#039;template-layout-full-width.php&#039; ) ) {
        $layout = &#039;full-width&#039;;
      } elseif ( is_archive() ) {
        if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) {
          $opt    = x_get_option( &#039;x_woocommerce_shop_layout_content&#039;, &#039;sidebar&#039; );
          $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
        } else {
          $opt    = x_get_option( &#039;x_archive_layout&#039;, &#039;sidebar&#039; );
          $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
        }
      } elseif ( x_is_bbpress() ) {
        $opt    = x_get_option( &#039;x_bbpress_layout_content&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( x_is_buddypress() ) {
        $opt    = x_get_option( &#039;x_buddypress_layout_content&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( is_404() ) {
        $layout = &#039;full-width&#039;;
      } else {
        $layout = $content_layout;
      }
    } else {
      $layout = $content_layout;
    }

    return $layout;

  }
endif;</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167871</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-167871</link>
					<pubDate>Fri, 19 Dec 2014 21:38:08 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>The code will only enable the layout with sidebar, there is another code that must display the sidebar.</p>
<p>Add this code at along with that,</p>
<pre><code>add_filter( &#039;ups_sidebar&#039;, &#039;woocommerce_sidebar&#039;, 9999 );

function woocommerce_sidebar ( $default_sidebar ) {

  $sidebars = get_option( &#039;ups_sidebars&#039; );

  foreach ( $sidebars as $id =&gt; $sidebar ) {
    if (  x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) {
      if ( array_key_exists( &#039;index-shop&#039;, $sidebar ) &amp;&amp; $sidebar[&#039;index-shop&#039;] == &#039;on&#039; ) {
        return $id;
      }
    }
  }

  return $default_sidebar;

}</code></pre>
<p>It will use the sidebar you set at <strong>Admin &gt; Appearance &gt; Sidebars</strong> that is set for Shop index.</p>
<p>Then add your widgets at <strong>Admin &gt; Appearance &gt; Widgets</strong>.</p>
<p>Hope this helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168676</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168676</link>
					<pubDate>Mon, 22 Dec 2014 08:18:06 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						<p>Can you tell me exactly where to have this code with the other code because when I add this to the functions.php file I only get a blank white screen on my site&#8230;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168693</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168693</link>
					<pubDate>Mon, 22 Dec 2014 08:31:47 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						<p>Sorry, I was missing the last } in the code 🙂</p>
<p>But the sidebar is still not showing on a single product page. I added a new sidebar with the name Vara and some widgets to it&#8230;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168886</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168886</link>
					<pubDate>Mon, 22 Dec 2014 13:55:34 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Gretar,</p>
<p>Thanks for writing in!</p>
<p>In that case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:</p>
<p>&#8211; Link to your site<br />
&#8211; WordPress Admin username / password<br />
&#8211; FTP credentials</p>
<p><strong>Don&#8217;t forget to select Set as private reply. This ensures your information is only visible to our staff. </strong></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168907</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-168907</link>
					<pubDate>Mon, 22 Dec 2014 14:25:28 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-169047</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-169047</link>
					<pubDate>Mon, 22 Dec 2014 17:57:32 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Gretar,</p>
<p>Thank you for the WordPress credentials!</p>
<p>The FTP login is necessary to check the backend files, unfortunately, we cannot provide our IP address as we&#8217;re working from different locations. </p>
<p>Meanwhile, you could try following this thread: <a href="https://theme.co/x/member/forums/topic/no-sidebar-in-woocommerce/#post-167286" rel="nofollow">https://theme.co/x/member/forums/topic/no-sidebar-in-woocommerce/#post-167286</a></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-169614</guid>
					<title><![CDATA[Reply To: Sidebar on single product page]]></title>
					<link>https://theme.co/archive/forums/topic/sidebar-on-single-product-page-4/#post-169614</link>
					<pubDate>Tue, 23 Dec 2014 08:20:46 +0000</pubDate>
					<dc:creator>gretar</dc:creator>

					<description>
						<![CDATA[
						<p>I added this code to functions.php</p>
<pre><code>if ( ! function_exists( &#039;x_get_content_layout&#039; ) ) :
  function x_get_content_layout() {

    $stack          = x_get_stack();
    $content_layout = x_get_option( &#039;x_&#039; . $stack . &#039;_layout_content&#039;, &#039;content-sidebar&#039; );

    if ( $content_layout != &#039;full-width&#039; ) {
      if ( is_home() ) {
        $opt    = x_get_option( &#039;x_blog_layout&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( is_singular( &#039;post&#039; ) ) {
        $meta   = get_post_meta( get_the_ID(), &#039;_x_post_layout&#039;, true );
        $layout = ( $meta == &#039;on&#039; ) ? &#039;full-width&#039; : $content_layout;
      } elseif ( x_is_portfolio_item() ) {
        $layout = &#039;full-width&#039;;
      } elseif ( x_is_portfolio() ) {
        $meta   = get_post_meta( get_the_ID(), &#039;_x_portfolio_layout&#039;, true );
        $layout = ( $meta == &#039;sidebar&#039; ) ? $content_layout : $meta;
      } elseif ( is_archive() ) {
        if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) {
          $layout = &#039;content-sidebar&#039;;
        } else {
          $opt    = x_get_option( &#039;x_archive_layout&#039;, &#039;sidebar&#039; );
          $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
        }
      } elseif ( x_is_product() ) {
        $layout = &#039;content-sidebar&#039;;
      } elseif ( x_is_bbpress() ) {
        $opt    = x_get_option( &#039;x_bbpress_layout_content&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( x_is_buddypress() ) {
        $opt    = x_get_option( &#039;x_buddypress_layout_content&#039;, &#039;sidebar&#039; );
        $layout = ( $opt == &#039;sidebar&#039; ) ? $content_layout : $opt;
      } elseif ( is_404() ) {
        $layout = &#039;full-width&#039;;
      } else {
        $layout = $content_layout;
      }
    } else {
      $layout = $content_layout;
    }

      if ( is_page_template( &#039;template-layout-content-sidebar.php&#039; ) ) {
        $layout = &#039;content-sidebar&#039;;
      } elseif ( is_page_template( &#039;template-layout-sidebar-content.php&#039; ) ) {
        $layout = &#039;sidebar-content&#039;;
      } elseif ( is_page_template( &#039;template-layout-full-width.php&#039; ) ) {
        $layout = &#039;full-width&#039;;
      }

    return $layout;

  }
endif;

add_filter( &#039;ups_sidebar&#039;, function ( $default_sidebar ) {

  $sidebars = get_option( &#039;ups_sidebars&#039; );

  foreach ( $sidebars as $id =&gt; $sidebar ) {
    if (  x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) {
      if ( array_key_exists( &#039;index-shop&#039;, $sidebar ) &amp;&amp; $sidebar[&#039;index-shop&#039;] == &#039;on&#039; ) {
        return $id;
      }
    }
  }

  return $default_sidebar;

}, 9999 );</code></pre>
<p>But that did not work.</p>
<p>Can&#8217;t you give me 1 IP address from you that you try to connect with ? The backend files should be alright, I have not edited them. I can also see that there is a new version of your theme out now. I will update the theme.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

