-
AuthorPosts
-
August 14, 2014 at 5:48 am #84371
Hi Sarah,
Your customizer loaded fine to me when I removed codes from functions.php file of your child theme.
I think the first part of that file is causing this issue:
if ( ! function_exists( 'x_renew_main_content_class' ) ) : // 1 function x_renew_main_content_class() { $blog_layout = get_theme_mod( 'x_blog_layout' ); $archive_layout = get_theme_mod( 'x_archive_layout' ); $shop_layout = get_theme_mod( 'x_woocommerce_shop_layout_content' ); $portfolio_layout = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $main_layout = get_theme_mod( 'x_renew_layout_content' ); if ( $main_layout != 'full-width' ) { if ( is_home() ) { $layout = $blog_layout; } elseif ( is_page_template( 'template-layout-portfolio.php' ) ) { $layout = $portfolio_layout; } elseif ( is_archive() ) { $layout = $archive_layout; if ( function_exists( 'is_shop' ) && is_shop() ) { $layout = $shop_layout; } if ( function_exists( 'is_product_taxonomy' ) && is_product_taxonomy() ) { $layout = $shop_layout; } } elseif ( function_exists( 'is_product' ) && is_product() ) { $layout = 'full-width'; } else { $layout = $main_layout; } } else { $layout = $main_layout; } if ( $layout == 'full-width' ) { $output = 'x-main full'; } else { switch ( $main_layout ) { case 'content-sidebar' : $output = 'x-main left'; break; case 'sidebar-content' : $output = 'x-main right'; break; } } echo $output; } add_action( 'customize_save', 'x_renew_main_content_class' ); endif;
I want to know where did you got those? They’re old & don’t work with latest version of X.
Please try adjusting the functions.php file of your child theme, the customizer will look fine then.
Now, which option you want to use cart menu in primary menu or a menu in top bar? It make no sense to me you’re trying both & creating issues serially. Please choose one & go for it. We’ll be glad to help. If you get confused yourself, it’ll make us confused for us too.
Have a nice day, Cheers!
August 14, 2014 at 2:04 pm #84752I’m not sure where the code came from but I’m also not really sure what to do to fix it. When you say “adjust” do you mean just delete the code?
I do have the standard cart widget in my shop sidebar. It lists all items in a line down the page, but what I was hoping to do was add a small cart icon to the top bar at top of page with the number of itms alongside. You might be right and this is overkill – I’m responding to a customer complaint and may not have thought it through. I’d like to have the option though, and perhaps delete it off one or other once I’ve looked at it more closely.
My number one wish for the top bar would be to have a login panel – username and password fields so they can login without leaving the page – but I can’t seem to find a way.
Next best alternative would be login/register links that change to “hi username” or “logout” once they’ve logged in.
My customer complained that she “kept being prompted to log in” – and I get her point – she’s already logged in but nothing has changed so she thinks we are “prompting” her on every page.
Thanks
August 14, 2014 at 2:10 pm #84756On thinking about it, I’ve had a lot of sidebar issues. My shop sidebar was appearing on category pages only and I’ve twice had someone (x) help with getting it back onto the main shop and product pages. Could this code have come from there? I’m happy to delete so long as my shop sidebar stays where it is and no sidebar appears outside of the shop.
Thanks for your help.August 14, 2014 at 3:11 pm #84814Hi Sarah,
I checked and you have updated your X to 2.3.0, and the code at your functions.php will only work on older version like 1.8.4. The solution is removing it, though always keep a backup.
Not just functions.pphp, if you have any template customization at your child theme, it’s better to remove them ( again get a backup first ).
Though, that will also remove customization added to your site including design elements and etc.
We can continue investigating other issues once core and customization compatibility is fixed.
Thank you.
August 14, 2014 at 3:11 pm #84815Hi Sarah,
I checked and you have updated your X to 2.3.0, and the code at your functions.php will only work on older version like 1.8.4. The solution is removing it, though always keep a backup.
Not just functions.pphp but also other template, so if you have any template customization at your child theme, it’s better to remove them ( again get a backup first ).
Though, that will also remove customization added to your site including design elements and etc.
We can continue investigating other issues once core and customization compatibility is fixed.
Thank you.
August 14, 2014 at 3:28 pm #84828Ok, but I don’t know which code to remove from that file. I don’t know what’s original vs added later.
And I thought the point of a child theme was to avoid this situation and NOT lose my customisations. How on earth am I meant to restore it all after? You people have done a lot of customisation for me in answering questions and I wouldn’t have a clue what these are.
August 14, 2014 at 3:59 pm #84860Hi Sarah,
Yes customization will stay intact, but it’s the same case why you’re having some issues. Because old customization added are still there and not working with newer core theme. There is a big changes added with newer version that make it not compatible with older versions. Thus to make it compatible is remove your older customization OR, edit your old customization and make it work with newer version.
For now, don’t remove those files but just rename them. Example functions_old.php, wp-single_old.php. Then once done, check if your site is working again. Then start renaming them back to their original file name one by one, while checking your site if still okay. From that, you will have a clue which file does break it and we will check which customization was added to that file and I will give you the code that will replace that (new version has new template structure).
Thanks!
August 14, 2014 at 9:04 pm #85035ok, thanks for your help.
I have just named the functions file _old as per your instructions. The customizer is now working again.
As a result the sidebar has disappeared in the products pages and it looks like we have two different sidebars showing on the shop and category pages – this was only fixed a few days ago by someone at x. It should be shop please on all shop related pages.
Numbers have also popped up alongside folders in the shop which is a correction i made several months ago.So, what do i do to fix all of this?
Also, I don’t see the file wp-single.php so functions is the only one i’ve renamed. If i still need to do that can you tell me where to locate it and any other files i should be changing – is it just anything with file extension php?
August 14, 2014 at 9:18 pm #85047Hi Sarah,
Now duplicate your functions_old.php and name it back to functions.php. Then remove all the code inside.
Once done, add this code at functions.php
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 );
Cheers!
August 14, 2014 at 11:20 pm #85131thanks so much.
I would still like to see the shop menu back on the individual product pages please.
And, then back to my original request… i need help getting the topbar showing, without social and with the cart widget and a login (username/password fields) if possible. I’ve tried activating myself but i’m seeing actual code and couldn’t get rid of the social icons.
Thanks again.
August 14, 2014 at 11:59 pm #85143Hi Sarah,
I am still getting this error.
Would you mind reinstalling the plugin.
Thanks
August 15, 2014 at 2:57 am #85184Hi, i’ve done that, not sure it’s fixed the issue – seems to still be missing??
August 15, 2014 at 2:58 am #85185and the qty numbers are back in the shop so that’s weird…
August 15, 2014 at 3:00 am #85186Hi Sarah,
As we described above: http://theme.co/x/member/forums/topic/add-cartmy-account-woocommerce-into-top-bar/page/2/#post-85047
All of your old codes are located in functions_old.php file, so create a new functions.php file in child theme & then copy/paste the codes into it.
Customizer will load fine & individual product sidebar will show again.
Then add menu shortcode for top bar & use Add to cart Button plugin to show cart in menus.
If you can’t do it yourself then share your FTP login or cPanel login info, even though it’ll cost more than 30mins but I’d be glad to remove all of your issues.
Have a nice day, Cheers!
August 15, 2014 at 3:11 am #85191This reply has been marked as private. -
AuthorPosts