This topic has 19 replies, 3 voices, and was last updated 8 years by sharmstr.

  • Author
  • #106159
     csloan
    Participant

    Is there anyway of getting rid of the shopping cart icon in the main menu on my site?  I activated Woo Commerce and it appeared in a somewhat random spot on my main menu and I don’t want it.  I’d like it to only be on the shop page…if at all…not my entire site.

    Is there more documentation on how to set up Woo Commerce than what’s at https://archived.seventhqueen.com/documentation/kleo?  I’ve never used Woo Commerce and what’s at this link is not too helpful.

     

    Thanks

    #106295
     rikbutterflyskull
    Participant

    Taken from this topic: https://archived.seventhqueen.com/forums/topic/hide-menu-on-all-pages/#post-96077

    Prerequisites: WooCommerce, wc pages, Theme Option > Woocommerce > Menu cart location* = Primary.

    add this to child functions.php

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>}";
        }
    }

    is_woocommerce reference. For is_cart and is_checkout look at “includes/wc-conditional-functions.php” source.

    #106298
     rikbutterflyskull
    Participant

    Sorry this is correct:

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>";
        }
    }
    #106378
     csloan
    Participant

    I placed the above code in the Quick CSS section of the Theme Options (see attached screen shot) and it didn’t work Shopping cart still appearing in main menu.

    Attachments:
    You must be logged in to view attached files.
    #106399
     rikbutterflyskull
    Participant

    I say to put it in functions.php

    #106400
     rikbutterflyskull
    Participant
    #106411
     csloan
    Participant

    paste it where specifically in functions.php?

    #106417
     rikbutterflyskull
    Participant

    after

    <?php

    COPY CODE
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */ 
    #106424
     csloan
    Participant

    Did not work and causes issue on site with extra }} appearing at top of page. SEE SCREEN SHOTS ATTACHED.

    Attachments:
    You must be logged in to view attached files.
    #106451
     rikbutterflyskull
    Participant

    You should copy the right code, the second i posted…

    #106454
     csloan
    Participant

    How is what I sent you in the screen shot and posted in child theme functions.php not what you posted above?

    I compared it and looks exactly the same. I copied it pasted it directly from your second post.

    #106460
     csloan
    Participant

    and now, despite deleting the code from both instances where it pasted it, I’ve got

    “; } }

    appearing in the header area. Searched the header for “; } } and nothing found. This wasn’t appearing before I pasted your code.

    #106475
     csloan
    Participant

    Forget my last post…I fixed the issue with the “;}}

    #106476
     csloan
    Participant

    And tried again….copied exact code from your second post above, and posted in the child theme function.php after the <?php Still no luck.

    #106483
     rikbutterflyskull
    Participant

    oh i had forgotten a piece of code, i’m really sorry 😀

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>";
        }
    }
    add_action('wp_head', 'cart_to_shop');
    #106487
     csloan
    Participant

    Still there. Posted the above code after <?php in function.php of child theme….cart still showing.

    #106491
     rikbutterflyskull
    Participant

    For my site works, I do not know what might be in your case

    Attachments:
    You must be logged in to view attached files.
    #106844
     sharmstr
    Moderator

    The issue is that you’ve put the code in your child theme, as you should. BUT you’re not running the child theme so the code will never work.

    Put is at the very bottom of your /kleo/functions.php file. But keep in mind that you’ll have to that after every Kleo update since you’re changing core code instead of using a child theme for changes.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #107032
     csloan
    Participant

    Yeah…I don’t know how that happened, because when I first activated Kleo, I activated the child theme. I was under the impression that all this time Child theme was activated. Now everything, all customizations I’ve been doing, have been in the main theme. I switched and activated the child theme and a lot will need to be updated.

    So I assume you suggest that I should at this point activate the Child theme and then apply all my customizations there? Probably the best idea.

    #107052
     sharmstr
    Moderator

    Yes, that’s what you should do.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 20 posts - 1 through 20 (of 20 total)

The forum ‘Plugins questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?