-
Author
-
February 24, 2016 at 07:31 #106159
csloan
ParticipantIs 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
February 24, 2016 at 17:45 #106295rikbutterflyskull
ParticipantTaken 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 CODEfunction 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.
February 24, 2016 at 17:51 #106298rikbutterflyskull
ParticipantSorry this is correct:
COPY CODEfunction cart_to_shop() { if ( is_woocommerce() || is_cart() || is_checkout() ) { } else { echo "<style type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>"; } }
February 24, 2016 at 22:11 #106378csloan
ParticipantI 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.February 24, 2016 at 23:01 #106400rikbutterflyskull
ParticipantFebruary 24, 2016 at 23:21 #106417rikbutterflyskull
Participantafter
<?php
COPY CODE/** * @package WordPress * @subpackage Kleo * @author SeventhQueen <themesupport@seventhqueen.com> * @since Kleo 1.0 */ /** * Kleo Child Theme Functions * Add custom code below */
February 24, 2016 at 23:34 #106424csloan
ParticipantDid 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.February 25, 2016 at 00:21 #106451rikbutterflyskull
ParticipantYou should copy the right code, the second i posted…
February 25, 2016 at 00:35 #106454csloan
ParticipantHow 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.
February 25, 2016 at 00:56 #106460csloan
Participantand 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.
February 25, 2016 at 01:31 #106475csloan
ParticipantForget my last post…I fixed the issue with the “;}}
February 25, 2016 at 01:39 #106476csloan
ParticipantAnd tried again….copied exact code from your second post above, and posted in the child theme function.php after the <?php Still no luck.
February 25, 2016 at 02:32 #106483rikbutterflyskull
Participantoh i had forgotten a piece of code, i’m really sorry 😀
COPY CODEfunction 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');
February 25, 2016 at 02:48 #106487csloan
ParticipantStill there. Posted the above code after <?php in function.php of child theme….cart still showing.
February 25, 2016 at 03:06 #106491rikbutterflyskull
ParticipantFor my site works, I do not know what might be in your case
Attachments:
You must be logged in to view attached files.February 26, 2016 at 15:02 #106844sharmstr
ModeratorThe 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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 27, 2016 at 06:35 #107032csloan
ParticipantYeah…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.
February 27, 2016 at 12:03 #107052sharmstr
ModeratorYes, 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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘Plugins questions’ is closed to new topics and replies.