Home › Forums › WoodMart support forum › Remove two section
Remove two section
- This topic has 21 replies, 2 voices, and was last updated 6 years, 10 months ago by
Artem Temos.
-
AuthorPosts
-
April 13, 2018 at 12:14 am #52263
wanilaParticipanthello!
I want to remove two section of my website theme. but not with css! I mean i want to remove them completely from the codes …
1. The number near cart icon in header ( i mean the number that shows how many products is in the user cart )
2. The dropdown in the bottom of account icon for logged in users ( i mean the dropdown in header that shows downloads … addresses … logout … and more )Which files i must edit for these two?
Thank you.April 13, 2018 at 6:22 am #52285
Artem TemosKeymasterHello,
You can find these elements and remove completely from the code in the file
inc/template-tags.php
.Regards
April 13, 2018 at 5:17 pm #52428
wanilaParticipantThank you. Could you please highlight and send me screenshots of the codes that i must remove?
+ Just please remember, in my second question, i want to remove the dropdown in mobile menu tooApril 13, 2018 at 5:42 pm #52434
Artem TemosKeymasterOK, here you have them
April 13, 2018 at 7:14 pm #52447
wanilaParticipantSorry, but one more question
For my second question, should i remove this function completely? http://s6.uplod.ir/i/00919/eufyw59lqwih.png
or i should only remove the lines that you sent me?
cause i found that there are some more codes in the end of that function that you didn’t highlight …April 13, 2018 at 9:36 pm #52467
Artem TemosKeymasterTry to empty the body of the function. It means just leave it empty.
April 13, 2018 at 9:45 pm #52472
wanilaParticipantyou mean i should remove all the codes of that function, and only let this highlighted section ( http://s6.uplod.ir/i/00919/eufyw59lqwih.png ) to be there?
April 14, 2018 at 6:15 am #52480
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_get_header_links() { $links = array(); if( ! woodmart_woocommerce_installed() ) return $links; $login_dropdown = woodmart_get_opt( 'login_dropdown' ); $links_with_username = woodmart_get_opt( 'links_with_username' ); $color_scheme = whb_get_dropdowns_color(); if( whb_is_enabled() ) { $settings = whb_get_settings(); $login_dropdown = isset( $settings['account'] ) && $settings['account']['login_dropdown'] && ( ! $settings['account']['form_display'] || $settings['account']['form_display'] == 'dropdown' ); $links_with_username = isset( $settings['account'] ) && $settings['account']['with_username']; } $account_link = get_permalink( get_option('woocommerce_myaccount_page_id') ); $current_user = wp_get_current_user(); if( is_user_logged_in() ) { $links['my-account'] = array( 'label' => esc_html__('My Account', 'woodmart'), 'url' => $account_link, 'dropdown' => '' ); if ( $links_with_username ) { $links['my-account']['label'] = sprintf( esc_html__( 'Hello, %s', 'woodmart' ), '<strong>' . esc_html( $current_user->display_name ) . '</strong>' ); } } else { $links['register'] = array( 'label' => esc_html__('Login / Register', 'woodmart'), 'url' => $account_link ); if( $login_dropdown ) { $links['register']['dropdown'] = ' <div class="sub-menu-dropdown color-scheme-' . $color_scheme . '"> <div class="login-dropdown-inner"> <h3 class="login-title"><span>' . esc_html__('Sign in', 'woodmart') . '</span><a class="create-account-link" href="' . esc_url( $account_link ) . '">' . esc_html__('Create an Account', 'woodmart') . '</a>' . '</h3> ' . woodmart_login_form( false, $account_link ) . ' </div> </div> '; } } return apply_filters( 'woodmart_get_header_links', $links ); }
April 27, 2018 at 9:49 am #54960
wanilaParticipantSorry, but could i remove the whole “My account menu” function completely?
Is there anything wrong with that?April 27, 2018 at 11:36 am #54986
Artem TemosKeymasterSorry, but we don’t understand what do you mean. Did you try the solution we gave you?
April 27, 2018 at 1:30 pm #55019
wanilaParticipantI explain my problem from the start …
I want to remove the dropdown menu for LOGGED IN users. ( I mean the menu that appear under the “My Account” icon in header … )
So my question is, can i remove the “my account menu” function in the “template-tags.php” file completely?+ here is two screenshot of the codes that i want to remove them from template-tags.php file:
1. http://uupload.ir/files/9e87_a1.jpg
2. http://uupload.ir/files/aku_a2.jpgIs it right to remove these highlighted code completely?
April 27, 2018 at 1:42 pm #55028
Artem TemosKeymasterTry to leave this function empty. If you will remove them completely, you will get a Fatal error.
April 27, 2018 at 1:56 pm #55033
wanilaParticipantSo you mean i remove the whole code of that function, and just let this section be there:
// **********************************************************************//
// ! My account menu
// **********************************************************************//Am i right?
April 27, 2018 at 1:57 pm #55035
Artem TemosKeymasterNo, you need to leave the function empty
function woodmart_get_header_links() {}
April 27, 2018 at 2:11 pm #55041
wanilaParticipantim so sorry, but i dont understand what should i do 🙁
here is my template-tags.php file. could you please change this file in the correct way and send it to me? thank you so muchApril 27, 2018 at 2:12 pm #55042
Artem TemosKeymasterIn this case, please, provide us your FTP access.
April 27, 2018 at 2:13 pm #55043
wanilaParticipanthere it is: https://uploadfiles.io/6hkqs
April 27, 2018 at 2:21 pm #55044
wanilaParticipantplease send me your ip
April 27, 2018 at 2:29 pm #55052
wanilaParticipantThank you. please check the private section
April 27, 2018 at 2:32 pm #55055
Artem TemosKeymasterPlease, check now.
April 27, 2018 at 3:47 pm #55063
wanilaParticipantthank you so much. which files did you edited for this one?
April 27, 2018 at 8:11 pm #55090
Artem TemosKeymasterWe edited the file
inc/template-tags.php
. -
AuthorPosts
- You must be logged in to create new topics. Login / Register