-
AuthorPosts
-
August 15, 2014 at 3:22 am #85193
Hi Sarah
You need to do the same as it said in link above :
Now duplicate your functions_old.php and name it back to functions.php. Then remove all the code inside
if ( ! function_exists( 'x_get_content_layout' ) ) : function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'content-sidebar' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'full-width'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; } if ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } return $layout; } add_action( 'customize_save', 'x_get_content_layout' ); endif; add_filter('theme_mod_x_stack', function($val){ return x_get_option( 'x_stack' ); }); add_filter('theme_mod_x_integrity_design', function($val){ return x_get_option( 'x_integrity_design' ); }); add_filter( 'ups_sidebar', function ( $default_sidebar ) { $sidebars = get_option( 'ups_sidebars' ); foreach ( $sidebars as $id => $sidebar ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { if ( array_key_exists( 'index-shop', $sidebar ) && $sidebar['index-shop'] == 'on' ) { return $id; } } } return $default_sidebar; }, 9999 );
Hope it helps.
August 15, 2014 at 3:30 am #85200Hi, yes i did that immediately as i said in the next post. I gained instant access to the customizer but still have sidebar issues and the qty counter has returned to the store.
August 15, 2014 at 3:33 am #85201Hey Sarah,
I can’t see functions.php file in your Renew Child theme:
August 15, 2014 at 3:36 am #85202ok, that’s really weird because it was absolutely definitely there earlier. Never mind, it’s there now!
August 15, 2014 at 3:39 am #85204Glad it works now.
if there is any other problem let us know.Thank you.
August 15, 2014 at 3:53 am #85209thanks. well i still have the original problem that i asked about in #84190. This thread starts with instructions to another user, to install the topbar. I was asking for help as I can’t seem to make that work and when i paste in the code as per the first 2-3 posts in this thread it doesn’t work for me. Just tried it again now and can’t get into customizer all over again so i’ve deleted it out again from functions.php.
So as well as getting the topbar showing, i was asking for it to be without social icons and with the cart widget and a login (username/password fields) if possible.
The qty on my shop shouldn’t be there either.
thx
August 15, 2014 at 4:42 am #85226Hi Sarah,
Check sidebar is showing in single product page:
Added the following CSS to customizer to remove social icons:
.x-topbar .x-social-global { display: none; }
Then added the following codes into functions.php to show Top bar Menu:
add_filter('option_x_topbar_content','x_topbar_do_shortcode'); function x_topbar_do_shortcode($content) { return do_shortcode( $content ); }
Now,
You customizer loading fine, Sidebar showing in product pages, menu showing top bar. Tell me what else do you need. I’ll be glad to assist you.
August 15, 2014 at 4:45 am #85228Oh brilliant, thanks so much.
What i’ve really been looking for, but just can’t find, is how to put a true login panel on the top bar. Ideally fields for username and password, or, if that’s not possible then something similar to what X has on this site – login text (or buttons) that changes once youre logged in to say “hi Sarah” or “loguout”
And can we right align topbar text and make it a little thinner height-wise?
cheers,
August 15, 2014 at 5:01 am #85233Hi Sarah,
To adjust the height of Top bar, add the following CSS:
.x-topbar .menu-top-bar-container { padding-bottom: 10px; } .x-topbar { text-align: right; max-height: 55px; }
Now, to show login logout link conditionally you need to use a plugin: https://wordpress.org/plugins/baw-login-logout-menu/
Add the login logout, menu items in Top bar menu via Appearance > Menus:
Hope this helps, Cheers!
August 15, 2014 at 5:11 am #85244ok, thanks. I can’t get in to the customizer again – it won’t go past step 2 initializing…
August 15, 2014 at 5:32 am #85255still can’t get into the customizer but i have installed the plugin you recommended. I guess i didn’t make clear that it’s the woocommerce login/register i’m trying to get, not the wordpress one (which i hope my customers NEVER lay eyes on). I can have a basic “login” link (as per my main menu) that connects to the wc my account page but i really want to avoid the customer having to leave the page they’re on to login if possible. Or at the very least be reactive like this one is and only prompt “login” if they haven’t already…
sorry, i know this is all getting a little complicated – and it seems so very simple!August 15, 2014 at 5:40 am #85260Hey Sarah,
There is noting wrong with in functions.php file now that anyone can argue.
Seems to me: If I place
add_filter('option_x_topbar_content','x_topbar_do_shortcode'); function x_topbar_do_shortcode($content) { return do_shortcode( $content ); }
the customizer won’t load perfectly, so please update all of your plugins. The above filter doesn’t occur any issue with other websites even in my local.
August 15, 2014 at 5:43 am #85262Opps, then you should use WooCommerce shortcode into top bar: http://docs.woothemes.com/document/woocommerce-shortcodes/
[woocommerce_edit_account] - Edit account pages [woocommerce_change_password] – shows the change password page [woocommerce_view_order] – shows the user account view order page [woocommerce_logout] - shows the logout page [woocommerce_pay] – shows the checkout pay page [woocommerce_thankyou] – shows the order received page [woocommerce_lost_password] – shows the lost password page [woocommerce_edit_address] – shows the user account edit address page
August 15, 2014 at 5:46 am #85263ok, thanks. done.
August 15, 2014 at 6:01 am #85271hmm, well i have “login” already on my menu that is a basic link to the woo my account page and this is what i was hoping to replace/improve upon. Can you tell me how to put a woocommerce shortcode into my top bar?
-
AuthorPosts