Is it possible to remove Product heading from MarketPress Store menu?

Since I have created a custom menu on my site that sorts my products and displays them the way I want is it possible to remove/hide the Products heading that appears under the Store page that MarketPress creates? The Shopping Cart and Order Status headings are fine there but I don't want the Products heading.

http://www.turnedoutgreat.ca is the site.

Thanks
Michael

  • micharms
    • Design Lord, Child of Thor

    Hi Joe.

    I'm not sure I can't figure out how to post a screenshot of exactly what I mean so I'll post one pointing to the menu item I'm talking about.

    Under the store item it shows Products, Shopping Cart and Order Status. I would like to get rid of Products under this heading.

    Michael

  • Ollie
    • The Incredible Code Injector

    That's slightly confusing or maybe I've read it wrong. But if you have set your Primary Navigation dropdown to be your main custom menu...

    Then no links should automatically be dragged into a custom menu, it sounds like something either is really stuffed up or a small setting is set incorrectly?

    Can you take a screenshot of Appearances > Menus please?

    Cheers

  • micharms
    • Design Lord, Child of Thor

    Billzy:
    I'm probably the one who didn't understand your original question since I'm an absolute rookie at this. Here is the screenshot you asked for. I want the shop page to stay in the menu because I want customers to be able to check their cart and check on their orders. What I want to remove is the product subheading under the store menu item. Although this subheading is automatically created by MarketPress when you include store in your menu it doesn't appear in the Appearance->Menu page

    I hope this and the screenshot explain things better.

    Michael

  • aecnu
    • WP Unicorn

    Greetings Michael,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • rickandersonaia
    • New Recruit

    I fixed this myself by unsetting the menu item. Here's the code I used. (bear in mind that this is within a class)

    add_filter( 'wp_nav_menu_objects', array($this,'remove_products_from_menu' ));

    public function remove_products_from_menu( $items ) {

    foreach($items as $key => $item){
    if($item->ID == 99999999999 && $item->title == 'Products'){
    unset($items[$key]);

    }
    }

    return $items;
    }

  • micharms
    • Design Lord, Child of Thor

    Hi Joe.

    It was great to get the code from Rick. I've tried to figure out where I need to put this but wherever I've tried it either doesn't work or it crashes the site. So unfortunately it hasn't worked for me yet. I'll spend some more time later this week trying to brainstorm where to put it and testing it but right now I need to get back to my woodturning to build up my inventory.

    Michael

  • aecnu
    • WP Unicorn

    Greetings Michael,

    Thank you for the additional input and I admit I am not a coder but I believe he put this in marketpress.php after line 128

    However, this will be gone upon the next update and this file is a critical file for updating.

    Therefore I would try getting rid of this another way that cannot be overwritten by an update being the Ultimate Branding plugin specifically the Network Wide Text Change module.

    I would replace "Products" with nothing or a space to see if that indeed gets rid of the item ~or~ perhaps change it to what you want it to say.

    Let us know how it goes in any event.

    Cheers, Joe

  • micharms
    • Design Lord, Child of Thor

    Thanks Joe. I did try the code there and it just crashes everything.I also tried several different areas to remove 'Product' but maybe didn't find the right place because it still showed up.

    I'll keep trying though.

    Michael

  • aecnu
    • WP Unicorn

    Greetings Michael,

    Thank you for letting me know and it would be in your best interest to update to the latest version of Market Press which appears that you are a few versions behind which will certainly resolve some unseen to date issues for you.

    You had mentioned in your original post that you have added a custom menu, does this item appear in that very menu? It appears so in your screen shot above:
    https://premium.wpmudev.org/forums/topic/is-it-possible-to-remove-product-heading-from-marketpress-store-menu#post-376390

    And you cannot remove it form that location?

    Let me know in any event and keeping the light on for you.

    Cheers, Joe

  • micharms
    • Design Lord, Child of Thor

    Hi Joe. I have updated to the latest version but for some reason it doesn't show that in the update. When I look at the plugin page it tells me I am running (and I'm going from memory here) 2.8.4 which I believe is the latest.

    The sub menu item I am trying to remove is not in my custom menu but in the store menu.

    Michael

  • micharms
    • Design Lord, Child of Thor

    I have finally figured out which lines I need to delete from market press.php to get rid of the "products" submenu in the store menu. Now I need just a little direction as to how to make this permanent so if I update it won't revert. So how do I do this?

    Thanks for your help with this.

    Michael

  • aecnu
    • WP Unicorn

    Greetings Michael,

    Thank you for letting us know and unfortunately because this file indeed is the Market Press main file and not a theme file etc. - it will indeed need to be updated in the event of an update.

    In this event, I would make a note to myself about this and how I did it to make for easier implementation in the event of an update.

    Sorry that there appears to be no other efficient way to make this happen.

    Sincerely, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.