How to get rid of "cart" and "search" in gridmarket

On the parent site (using FrameMarket and GridMarket child theme with MarketPress), how do I get rid of the "cart" and "search" items in the header?

In this case I only want the parent site to display products from the sub sites (which it does), but I want to keep checkout at the sub-site carts.

Also on the "search", I had to use the global search plugin to search products (and this works fine), but the regular search field does not work.

So I either need to suppress the regular search field (or better yet replace it with the global search field).

Thanks!

  • Timothy Bowers

    Hey there.

    If you want to totally remove them then open up:

    /gridmarket/header.php

    Remove:

    $settings = get_option('mp_settings');
    						if (!$settings['disable_cart']) {
    						?>
    									<div id="cart-contents"><?php _e( 'Cart:', 'framemarket' ) ?> <span><?php echo sprintf(__('%s item(s)', 'framemarket' ), mp_items_count_in_cart()); ?></span></div>
    						<div id="mp-cartsmall">
    									<div id="toggle">
    								<a id="open" class="open button" href="#"><?php _e( 'View Cart', 'framemarket' ) ?></a>
    
    							<a id="close" style="display: none;" class="close button" href="#"><?php _e( 'Hide Cart', 'framemarket' ) ?></a>
    
    							</div>
    						</div>
    
    						<?php
    						}

    For the search you would need to take a look at the global search plugin and the code used there. That would be a base to code it to replace the search.

    https://premium.wpmudev.org/project/global-site-search/

    Take care.

  • LANSRAD

    You said:

    "If you want to totally remove them then open up:
    /gridmarket/header.php"

    If I modify that file, won't it suppress it on the sub sites as well as the parent site?

    I think it would be very useful to have an option in the theme settings to display the cart and search items in the header (or not).

    That would make it possible to be selective about using them.

    Also it would be helpful (if global site search was installed) to have an option for it to appear in the header (instead of the standard search).

    These options make the entire set of themes and plugins more useful in real life configurations.

  • LANSRAD

    Just to follow up (for others that may have similar needs), removing the code as instructed worked fine.

    To get the global site search plugin to work from the parent site (in place of the regular search), I simply removed the code from header.php that normally generated the search field and button, then replaced it with this code from a page generated after adding the global site search template:

    <div id="search-bar">
    <form action="/wptest/site-search/" method="post"><table border="0" border="0" cellpadding="2px" cellspacing="2px" width="100%" bgcolor=""><tr><td style="font-size:12px; text-align:left;" width="80%"><input name="phrase" style="width: 100%;" type="text" value=""></td><td style="font-size:12px; text-align:right;" width="20%"><input name="Submit" value="Search" type="submit"></td></tr></table></form>
    </div>

    That left me with a search field and button in the same place as the original, but now it calls the global site search.

    So the end result is that from the parent site I can search the products of any of the sub sites (via the global plugin) and meanwhile the sub sites use the regular search function to search products within that site only.

    Just what I was looking for!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.