MarketPress no sidebars?

I was able to get the main store page to remove sidebars using the “Page Attributes” area (like other posts/pages), but the product pages, etc., don’t have the page attribute options available.

I don’t want ANY of the store pages to have the sidebars that I use in the rest of the site.

Help?

  • Kimberly
    • Champion of Loops

    ProSapien,

    Hello and thanks for being a WPMU member :slight_smile:

    Have you checked out the Themeing_Marketpress.txt file that came with the plugin?

    Also, which theme are you using?

    There is some discussion in this thread that goes a little more in depth into customizing your marketpress product pages: https://premium.wpmudev.org/forums/topic/marketpress-store-and-product-page-customization

    Please let me know what I can do to help and if you can find the information you need in the .txt file :slight_smile:

    Kimberly

  • ProSapien
    • The Crimson Coder

    I’ll look at that file, but I’m not adept at php, so I probably wouldn’t know how to edit it correctly. Can someone tell me the code for no sidebars and where to put it?

    Using Thesis theme.

    I’ll also check out the thread you linked to.

  • Arnold
    • El Macho WP

    Hi @prosapien.

    I’m afraid the problem is the Thesis theme. Thesis has multiple page templates, one of which is No Sidebars. However the Product pages are virtual pages that are generated by Marketpress. They don’t actually exist as pages so they always get inserted in to the default template. You can set No Sidebars on the Store page but all the subpages will not inherit.

    To work around it you would have to use Thesis’ thesis_hook_custom_template() and a bunch of programming to get it to modify the correct virtual pages.

    Sorry, but it’s the way Thesis handles templates.

  • Tammie
    • WordPress Wizard

    @arnoldb whilst Thesis does do that and yes by default the pages are dynamically created, there is potentially a way around this which we are exploring.

    I’m going to paste a section here from the theme readme for MarketPress as an illustration of how we may be able to do this with page templates.

    Advanced Themes:

    MarketPress uses custom post types to display it’s products. This means that you can use

    the same WP theme templating system you are familiar with. We simply provide a customized

    subset of template functions so you don’t have to worry about dealing with post meta. Template

    functions are fully documented and can be found in the /marketpress/template-functions.php file.

    MarketPress searches your current theme folder for template files specific to store pages. If

    a template file does not exist it loads the theme’s page template instead. Just like WP, the

    plugin will search for templates in order of priority from top to bottom. Here are possible

    file names for store templates in order:

    Single Product Page

    mp_product-PRODUCTNAME.php

    mp_product-PRODUCTID.php

    mp_product.php

    Store Page

    mp_store.php

    Cart/Checkout Page

    mp_cart.php

    Order Status Page

    mp_orderstatus.php

    Product List Page

    mp_productlist.php

    Product Category List Page

    mp_category-CATEGORYSLUG.php

    mp_category-CATEGORYID.php

    mp_category.php

    mp_taxonomy.php

    mp_productlist.php

    Product Tag List Page

    mp_tag-TAGSLUG.php

    mp_tag-TAGID.php

    mp_tag.php

    mp_taxonomy.php

    mp_productlist.php


    Global Listings – Will only work on main site/blog


    Product List Page

    mp_global_products.php

    mp_productlist.php

    Product Category List Page

    mp_global_category-CATEGORYSLUG.php

    mp_global_category.php

    mp_global_category_list.php

    Product Tag List Page

    mp_global_tag-TAGSLUG.php

    mp_global_tag.php

    mp_global_tag_list.php

    Now, we may not be able to keep all the dynamic elements that Thesis has but we should just like with any WordPress theme (and Thesis is but a theme at the core) be able to go the custom page template route.

    I have not tested the theory but my first suggestion would be along the lines of take that full template from Thesis save as the filename mp_product.php and take it from there. You probably will have to do some adjustment but that’s the principle I’d suggest.

  • ProSapien
    • The Crimson Coder

    Appreciate all the feedback. Thank you all.

    my first suggestion would be along the lines of take that full template from Thesis save as the filename mp_product.php and take it from there. You probably will have to do some adjustment but that’s the principle I’d suggest.

    Are you saying to take the blocked text above and create a file and upload it?

  • Arnold
    • El Macho WP

    @tammie

    But Thesis doesn’t handle template the standard way. You have to hook them to a page template and there’s no place to specify that easily for virtual pages like the product page.

    @prosapien

    I figured a way out for you. Add this to your custom_functions.php

    add_filter('thesis_show_sidebars', 'mp_no_sidebars');
    function mp_no_sidebars(){
    $uri = $_SERVER['REQUEST_URI'];
    if (stripos($uri,'/store/')) return false; //anything under the /store/ path will now have no sidebars
    else return true;
    }

    You’ll have to struggle with the css a bit but it’s a start.

  • ProSapien
    • The Crimson Coder

    ArnoldB, I really appreciate your help. I added that code to the end of the custom_functions.php file, but unfortunately it didn’t change either the products list page of the individual products page. :disappointed:

    I was hoping to modify it slightly to give the same no sidebars look to the events pages, but something isn’t quite working.

    Ideas?

  • Arnold
    • El Macho WP

    @prosapien

    Take a look at the url of the page you want to have no sidebars. That is what is returned by $_SERVER

    All it’s doing is comparing the url to see if it’s what should be without sidebars and returning a false if so. So match up some portion of the url in the if statement and it should work. You might have to make several comparisions depending on what you want to cover.

  • aecnu
    • WP Unicorn

    Greetings ProSapien,

    If you have not already please upgrade Thesis template to the newest version.

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the ‘Mark as Not Resolved (re-open)’ box below the post area (or else we’ll miss it!)

  • ProSapien
    • The Crimson Coder

    Installed 1.8.3 but it isn’t visible in the appearance>theme area. Checked in with DIY admins — they said 1.8.3 isn’t stable with multisite and they are working on resolving the multisite issues for 1.8.4 — which should be out in a few days.

    Anyway, 1.8.2 *should* be working with this code, but isn’t. Any idea what the problem is?

  • Arnold
    • El Macho WP

    You’ve also got Multisite with Thesis? How are you managing different blog custom files?

    Thesis and Multisite don’t mix well unless you make mods and it may be your not even running the code if it’s not in the right set of custom files. Way to check is put an

    echo ‘running’;

    in the function and see if it shows on the screen.

    There are several ways Thesis might be modified for Multisite so it would depend on how.

  • camparoo
    • Site Builder, Child of Zeus

    I think you’re going about this backward (or maybe I am)!

    What I would do is set up thesis to have no sidebars. This would make the ‘index’ page sidebar free, and would make all of your virtually created pages follow this format. Then, you create a custom template in Thesis that is a page that does happen to have a sidebar or two. After you have your custom template with sidebars in place, you will be able to select it for all of the other pages on your site via the WordPress Dashboard.

    If you need info on creating a custom template, just ask :o) I spend way too much time fooling around with Thesis.

  • ProSapien
    • The Crimson Coder

    But that’s not all ArnoldB did. The ERRORS are gone, too. What did you do???

    WPMU, you should HIRE this man! I’ve been trying to get help solving these problems for over a week and he seems to have fixed everything in just a few minutes.

  • Brian
    • Design Lord, Child of Thor

    Hey guys, I’m having this same problem, Is there a default code for those not using Thesis and not on a Multi-site set up ? Something I can put into my child-theme?

    I don’t have Sidebars on any on my site elsewhere, as the theme comes with an amazing array of page templates, one of them being ‘Full Width’ which I’m using across the whole site. Its these ‘Virtual pages’ in marketpress that are blowing my mind, Ive been trying to solve this for days now, longer than its took me to build the site itself ! HA.

    I’m not at a level where I can create things from scratch using PHP so the list of what MarketPress ‘can do’ is way over my head also .

    Thanks in advance, Brian :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.