I want to remove the sidebar from Flexmarket theme in MarketPress

How do I remove the sidebar widget from Flexmarket theme from showing up on my site: vib.in? I am NOT using FrameMarket.

Nothing is added to it, but I can't remove it from showing up. It's just empty whether i'm logged in as a user or not.

Is there code I can disable so it does not show up by default? Also, if I do want it to show, can I get it to show on the left -- it's currently defaulted to the right side without any option of switching sides.

Thanks!

Best,

Ashish

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    I hope you are well today and thank you for your question.

    To disable sidebar from Flexmarket ( Not FrameMarket ) theme, you can add following CSS code in stylesheet file of your child theme or add it in the site using any of the following plugins.

    #sidebar {
    display: none;
    }
    
    .container .row-fluid .span8 {
    width: 100% !important;
    }

    http://wordpress.org/plugins/my-custom-css
    http://wordpress.org/plugins/simple-custom-css

    Best Regards,
    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    Hi -- I want to instead not remove the sidebar. I just want to move it to the left side, instead of right

    To achieve this just remove the previously added CSS code and add the following CSS code in place of it the same way as described in the previous reply.

    #sidebar {
    margin-left: 0;
    margin-right: 2.564102564102564%;
    border-left: 0 !important;
    border-right: 1px dashed rgba(62, 62, 62, 0.5);
    }
    
    .container .row-fluid .span8 {
    float: right;
    }

    Kind Regards,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Hi Vinod,

    I have a question about the side bar for the store -- it's not showing up in my theme, FlexMarket.

    The sidebar for the individual store (homepage.com/username#1/store). I want the sidebar to show up for the store level. I have a global search for the global page (Homepage.com). I want each individual store to have it's own internal search -- the issue is the sidebar is not showing up on the individual store. Check the site http://vib.in/test/store -- it should have a sidebar like the global page. But it's not showing up at the moment. Is the code inserted above hiding it in any way?

    Thanks

    Ashish

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    Check the site http://vib.in/test/store -- it should have a sidebar like the global page. But it's not showing up at the moment. Is the code inserted above hiding it in any way?

    The previously added code is not hiding it anyway as it needs #sidebar selector to hide it and the page http://vib.in/test/store doesn't contain sidebar markup and the id sidebar.

    Also i have already told you in my previous reply to remove the previously added code which was hiding the sidebar.

    Regards,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Hi Vinod -- I removed the code that was hiding the sidebar and only added your code for moving it to the left to my stylesheet:

    #sidebar {
    margin-left: 0;
    margin-right: 2.564102564102564%;
    border-left: 0 !important;
    border-right: 1px dashed rgba(62, 62, 62, 0.5);
    }

    .container .row-fluid .span8 {
    float: right;
    }

    How do I add sidebar markup and ID? -- the Flexmarket theme let's me edit the sidebar for the Store. However, that theme's sidebar isn't even showing up on the store page. Is it because it's a subdirectory of the global site?

    Thanks

    Ashish

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    How do I add sidebar markup and ID?

    You can add this using the following code in the page template file.

    <?php get_sidebar(); ?>

    the Flexmarket theme let's me edit the sidebar for the Store. However, that theme's sidebar isn't even showing up on the store page.

    Would you mind if I logged in to your site and did some testing? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings from the following path and reply on this thread after granting it?

    Admin -> WPMU DEV -> Support -> Support Access Tab

    Is it because it's a subdirectory of the global site?

    No i don't think so as it is working fine on my test site.

    I just noticed on your site in the store page http://vib.in/test/store/ the error404 class is added to the body ( See the attached screenshot ), this is not the case with the flexmarket demo site store page http://www.marketpressthemes.com/flexmarket/store/

    Also the products page http://vib.in/test/store/products has a class home blog added to the body tag ( See the attached screenshot ) which is same as flex market products demo page http://www.marketpressthemes.com/flexmarket/store/products

    I think this is the issue of the theme.

    Could you please contact the theme author on the following page to get this issue resolved in the theme?

    http://www.marketpressthemes.com/forum/

    Regards,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    I have added the line of code: <?php get_sidebar(); ?> to the Page Template file in the Editor for the Theme.

    Also, I have granted access for you.

    If you goto the Dashboard for the site 'Test' -- you'll see that i've created widgets for its sidebar under Appearance --> Widgets. However, these aren't showing up.

    One other issue is that the Shopping cart is not showing up now even after adding items. It shows in the on page shopping cart, but when I go to hit check out, it doesn't work.

    vib.in/test/store/shopping-cart

    I'll contact the author as well

    Thanks!

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    Thank you for granting me support access.

    I checked the theme files and found the theme author has overwritten mp_store.php MarketPress plugin store template file so you will have to add sidebar code in this template file instead of page.php to display the sidebar on store page.

    Cheers,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Great! I've added it -- however, it's not acting exactly like the sidebar should be looking -- http://www.vib.in/test/store. The sidebar is full-width underneath the rest of the content. How do I make it look like the global page -- http://vib.in where it's on the side of all the content? Thanks!

    Here's the code for the MPStore for the theme (the sidebar code is in bold at the bottom):
    <?php get_header(); ?>

    <!-- Homepage Content -->

    <div id="homepage-content-wrapper">
    <div class="outercontainer">
    <div class="clear padding15"></div>
    <div class="container">

    <?php

    $storepagetemplateid = esc_attr(get_option('mpt_storepage_layout_code'));

    if (!empty($storepagetemplateid) && is_numeric($storepagetemplateid) && class_exists( 'MarketPress' )) {

    echo do_shortcode('[template id="'.$storepagetemplateid.'"]');

    } else {

    do_action('flexmarket_product_listing_page' , 'productlistingpage' , 'list');
    }

    ?>

    </div><!-- / container -->
    </div><!-- / outercontainer -->
    </div><!-- / homepage-content-wrapper -->

    <!-- End Homapage Content -->

    <!-- Footer Widget -->

    <?php
    $selected = get_option('mpt_enable_homepage_footer_widget');

    if ($selected) {
    get_template_part('footer', 'widget');
    }

    ?>

    <!-- End Footer Widget -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  • Ashish
    • Site Builder, Child of Zeus

    Hi Vinod -- just add-on, the sidebar seems to be showing up at the top of the Global Page now. Is there a way to fix this? I removed the code and the store seems to be fine...

    If you see my global site -- http://vib.in, the top of the page has the sidebar. Not sure where it's getting this from.

    Thanks

    Ashish

  • Ashish
    • Site Builder, Child of Zeus

    I've resolved the Global page issue -- I had that code: <?php get_sidebar(); ?>

    in the page template file. I've removed this code line entirely.

    Still have the issue of the sidebar not showing up on the store in the correct position (in the actual sidebar location). Where exactly do I add this piece of code to make it show?

    I'll try to ping the author as well

    Thanks

    Ashish

  • Ashish
    • Site Builder, Child of Zeus

    Hi Vinod,

    Thanks for resolving this! One question, when I add pages like Contact page (http://vib.in/contact) can I put CSS on that particular page or a group of pages to remove the sidebar only when i'm on that page with this code below?

    #sidebar {
    display: none;
    }

    .container .row-fluid .span8 {
    width: 100% !important;
    }

    How do I add this only to affect the Contact Page and any other pages like Terms of use, etc.

    Thanks!

  • Ashish
    • Site Builder, Child of Zeus

    One question -- can we move the sidebar widget even more left on all pages? See picture, I want it smaller and sleeker, can we also remove the spacing in between each widget? Finally, I circled the "Filter by" text, can we fix that so it's showing fully?

    The other issue is the responsive theme -- the theme rearranges all my widgets trying to fit them on the screen. Any way to resize & rescale instead of rearranging the widgets and having them rearrange -- for example when you make the desktop window smaller, everything is overlayed on top of each other. I'm assuming it's for mobile optimization. What can we do to prevent it from looking terrible on mobile?

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    One question -- can we move the sidebar widget even more left on all pages? See picture, I want it smaller and sleeker, can we also remove the spacing in between each widget? Finally, I circled the "Filter by" text, can we fix that so it's showing fully?

    Yes you can achieve this by developing CSS code.

    The other issue is the responsive theme -- the theme rearranges all my widgets trying to fit them on the screen. Any way to resize & rescale instead of rearranging the widgets and having them rearrange -- for example when you make the desktop window smaller, everything is overlayed on top of each other. I'm assuming it's for mobile optimization. What can we do to prevent it from looking terrible on mobile?

    The only responsive theme currently we have is aSimpleMarket theme

    The FrameMarket theme you are using is not fully responsive but you can make it responsive by developing custom CSS code using CSS media query.

    You will find more information about responsiveness and media query on the following pages.

    https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
    http://www.w3schools.com/css/css_mediatypes.asp
    http://line25.com/tutorials/create-a-responsive-web-design-with-media-queries
    http://css-tricks.com/css-media-queries/
    http://www.w3.org/TR/css3-mediaqueries/

    If you are not a programmer then you can consider hiring a developer from https://premium.wpmudev.org/wordpress-development/ to develop it.

    To help keep support tickets separate, could you please open a new thread for your new questions. This helps to prevent any confusion (for us) as I'm sure you understand.

    This might also help other members looking for a similar answer. :slight_smile:

    Cheers,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Will do -- sorry about that will open new threads.

    One question about something earlier in this post on adding the sidebar, it's not showing up on the Categories page.

    When I goto http://vib.in/test/store and click on 'Sunglasses' under categories or any of the tags on the site, it takes me to another page that doesn't have the sidebar. Where do I insert the get_sidebar function to get the sidebar on those pages? Thanks!!

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    I tried to access your site http://vib.in/test/store but it was inaccessible.

    From the question i can suggest you to display sidebar on the categories pages by adding the get_sidebar function in one of the following theme template file.

    mp-category.php
    product_category.php
    archive.php

    You will find more information about WordPress theme templates on the following page.

    http://codex.wordpress.org/Template_Hierarchy

    Cheers,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Thanks for that, the file that we need to add the code to is MP-Category.php. However, I am unable get it the way you had added it to MP-Store.php. In that file you have the sidebar added as the following:

    <div id="sidebar" class="span4">
    <?php get_sidebar(); ?>
    </div>

    That Span4 area is not present in MP-Category.php. I added that exact code and it did not respond. How do I get the sidebar on the categories page the same way?

    Thanks

    Ashish

  • Vinod Dalvi
    • WP Unicorn

    Hi Ashish,

    The structure of the markup of conainer div <div class="container">..</div> in your mp-category.php file should be as following so please add the markup which is not present in it.

    <div class="container" style="min-height: 450px;">
    	<div class="row-fluid">
    		<div class="span8">
    			<div id="advanced-sort" class="align-right">....</div>
    			<div id="adv-sort" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="advancedSort" aria-hidden="true">.....</div>
    			<div id="mpt-product-grid">....</div>
    		</div>
    		<div id="sidebar" class="span4">
    			.....
    		</div>
    	</div>
    </div>

    Cheers,
    Vinod Dalvi

  • Ashish
    • Site Builder, Child of Zeus

    Ok -- I cannot just copy and paste that code into the file correct? I have granted you access to my site. How would I fit that code up there into this? Do I put in the "...." parts of the code? Thanks

    Here's the code from Category php:

    <?php get_header(); ?>
    
    	<!-- Page -->
    	<div id="page-wrapper">
    
    		<div class="header-section">
    			<div class="outercontainer">
    				<div class="container">
    					<div class="clear padding30"></div>	
    
    					<?php
    						global $wp_query;
    						$termname = $wp_query->queried_object->name;
    						$termslug = $wp_query->queried_object->slug;
    						$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    						$showmpdg = get_option('mpt_mpdg_enable_dg');
    						$entries = ( !empty($showmpdg) ? ( $showmpdg == 'true' ? get_option('mpt_mpdg_listing_entries') : get_option('mpt_mp_listing_entries')) : get_option('mpt_mp_listing_entries'));
    
    						$moreargs = array(
    							'showposts' => $entries,
    							'orderby' => 'date',
    							'order' => 'DESC',
    							'paged' => $paged
    						);
    
    						$args = array_merge( $wp_query->query_vars, $moreargs );
    
    						query_posts($args);
    					?>
    
    					<?php if (have_posts()) : ?>		
    
    						<h1 class="page-header"><span><?php _e('Items in ', 'flexmarket'); ?>‘<?php echo $termname; ?>’</span></h1>
    
    					<div class="clear padding15"></div>
    
    				</div><!-- / container -->
    			</div><!-- / outercontainer -->
    		</div><!-- / header-section -->	
    
    		<div class="content-section">
    			<div class="outercontainer">
    				<div class="clear padding30"></div>
    				<div class="container" style="min-height: 450px;">			
    
    							<?php if ( class_exists( 'MarketPress' ) ) { ?>
    
    								<?php do_action('flexmarket_category_page' , $termslug , 'category'); ?>
    
    							<?php } ?>
    
    						<?php else : ?>
    
    						<!-- nothing found -->
    
    						<h1 class="page-header"><span><?php _e('Items in ', 'flexmarket'); ?>‘<?php echo $termname; ?>’</span></h1>
    
    					<div class="clear padding15"></div>
    
    				</div><!-- / container -->
    			</div><!-- / outercontainer -->
    		</div><!-- / header-section -->	
    
    		<div class="content-section">
    			<div class="outercontainer">
    				<div class="clear padding30"></div>
    				<div class="container" style="min-height: 450px;">
    
    							<h2><?php _e('Nothing Found.'); ?></h2>
    
    							<p><?php _e('Perhaps try one of the links below:'); ?></p>
    							<div class="padding10"></div>
    							<h4><?php _e('Most Used Categories'); ?></h4>
    
    <ul>
    								<?php wp_list_categories( array( 'taxonomy' => 'product_category' , 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
    							</ul>
    							<div class="padding20"></div>
    							<p><?php _e('Or, use the search box below:'); ?></p>
    							<?php get_search_form(); ?>
    							<div class="padding20"></div>
    
    						<!-- / nothing found -->
    
    						<?php endif; ?>
    
    				</div><!-- / container -->
    			</div><!-- / outercontainer -->
    		</div><!-- / content-section -->	
    
    	</div><!-- / page-wrapper -->
    
    <?php get_template_part('footer', 'widget'); ?>
    
    <?php get_footer(); ?>
  • PC
    • WPMU DEV Initiate

    Hello there Ashish,

    Thanks for posting back and sorry for the long delay here.

    Let me discuss this with @Vinod Dalvi and get a solution for you on this thread.

    Can you send the FTP login details for your site with your WordPress admin username and password so that we can have a closer look ?

    You can send that to contact[at]wpmudev[dot]org

    Include a link to this thread and mark the email to my attention.

    Cheers, PC

  • Ashish
    • Site Builder, Child of Zeus

    Hi -- Sorry for the delay

    So I changed servers and was getting the site up on that.

    I tried putting the <?php get_sidebar(); ?> in the MP Store PHP file in the theme. However, it's not placing it in the right place. Same issue with the categories places.

    How can I get the sidebar on the Store Page, Categories pages, and Tag pages.

    I can grant you access via the admin panel (WPMU Dev - Support - Support Access). It's been provided. Please let me know.

    Thanks!

    Ashish

  • Ashish
    • Site Builder, Child of Zeus

    Attached is the code from the old site that had the store with the correct SideBar showing.

    I think in the files we want the sidebar to show up, we need to create a span4 / span8 for the sidebar and main area.

  • Ashish
    • Site Builder, Child of Zeus

    Yeah wasn't letting me attach that file -- Here's the code:

    <?php get_header(); ?>

    <!-- Homepage Content -->

    <div id="homepage-content-wrapper">
    <div class="outercontainer">
    <div class="clear padding15"></div>
    <div class="container">

    <div class="row-fluid">
    <div class="span8">
    <?php

    $storepagetemplateid = esc_attr(get_option('mpt_storepage_layout_code'));

    if (!empty($storepagetemplateid) && is_numeric($storepagetemplateid) && class_exists( 'MarketPress' )) {

    echo do_shortcode('[template id="'.$storepagetemplateid.'"]');

    } else {

    do_action('flexmarket_product_listing_page' , 'productlistingpage' , 'list');
    }

    ?>
    </div><!-- / span8 -->

    <div id="sidebar" class="span4">
    <?php get_sidebar(); ?>
    </div>

    </div><!-- / row-fluid -->

    <div class="padding20"></div

    </div><!-- / container -->
    </div><!-- / outercontainer -->
    </div><!-- / homepage-content-wrapper -->

    <!-- End Homapage Content -->

    <!-- Footer Widget -->

    <?php
    $selected = get_option('mpt_enable_homepage_footer_widget');

    if ($selected) {
    get_template_part('footer', 'widget');
    }

    ?>

    <!-- End Footer Widget -->

    <?php get_footer(); ?>

  • Ashish
    • Site Builder, Child of Zeus

    Can you do the same for the Categories MP File in the Theme Editor Area? (MP_Category.php)

    It's the same issue -- Vinod knows what i'm talking about. The Span 4 & Span 8 Elements are missing splitting the main content area and the sidebar.

    Not sure how to implement it properly.

    Thanks for your help on this -- it's just adding those elements so the sidebar shows up.

    Much appreciated!!

  • Michael Bissett
    • Recruit

    Hey @Ashish,

    Just finished updating mp_category.php, please confirm that it's looking the way you want it to. :slight_smile:

    Regards,
    Michael

    P.S. I'd recommend making a child theme for this before too long, with the mp_category.php & mp_store.php pages included. That way, when the theme is updated, the changes we've made to those files won't be lost.

    You can read up on making a child theme here:

    https://premium.wpmudev.org/blog/create-wordpress-child-theme/

  • Ashish
    • Site Builder, Child of Zeus

    Thanks Michael -- you are awesome!

    Very much appreciated. To create my Child theme, I just created a new folder in my themes folder on the server called Flexmarket-child. Then I copied the files from the parent theme into it.

    The next step is to just activate that child theme correct and work off that?

  • Patrick
    • Support Monkey

    Hi there @Ashish

    I hope you are well today!

    No, simply copying files from the parent will not create a workable child-theme. If anything, activating that will throw a bunch of errors on your site.

    You must create a new style-sheet in your child-theme folder that identifies the theme as a child of Flexmarket. Then copy the templates you want to edit from the parent to the child.

    The only file you must not copy is functions.php. If you need a functions.php in the child, you must create it first, then add your custom functions to it.

    To create a child-theme, please review this document on WordPress.org:
    https://codex.wordpress.org/Child_Themes

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.