Forum Replies Created
-
AuthorPosts
-
yashitamittal11
MemberThanks Braddalton
I am not using a Genesis-based theme. Otherwise, it would have been easy.
I will look into CSS Grid.yashitamittal11
MemberHello
I cannot use custom HTML as the client wants backend team to manage the testimonials. Custom HTML involves coding so that is not the option.
I also want rotating video testimonials. 3 video testimonials should be displayed side by side and load up other testimonials after a few seconds. If I use video widget, that won't rotate the videos.
Please suggest
yashitamittal11
MemberI have again put the files on the live server.
It is working fine now. The admin bar is showing up.I have identified the problem. WordPress is prompting me to update 4 plugins:
1. Jetpack by WordPress.com
2. WooCommerce
3. WooCommerce PayPal Express Checkout Gateway
4. WooCommerce Services
After I update them, the site breaks. Admin bar stops showing and changes made to Dashboard menus don't reflect on the website.What should I do about it? It is not possible to not update the plugins forever.
Please suggest.
yashitamittal11
MemberHi
2nd problem is solved.
I just want insight on 1st issue.Thanks
September 9, 2017 at 12:39 am in reply to: Not able to apply custom style to WooCommerce page #211236yashitamittal11
MemberHi Sabine
Thanks for the link.
yashitamittal11
MemberHello,
I have migrated my website and it now exists on mgtools.in.
I want to change woocommerce styles on Products page.I am able to change WooCommerce styles using wp_add_inline_style
Code that goes in functions.php-function my_styles_method() { if (is_woocommerce()) { $custom_css = " .woocommerce .site-inner div.breadcrumb span.breadcrumb-link-wrap a { text-decoration: none; color: pink; } .archive-title { display: none; }"; wp_add_inline_style( 'custom-stylesheet', $custom_css ); } } add_action( 'wp_enqueue_scripts', 'my_styles_method',11);
I would like to know, is this the correct method if I need to add more styles. So much styling is now in functions.php file.
2. The other problem you mentioned is the order in which the stylesheets are loaded. But when I look in the Developer - View Source, custom.css is loaded after the Woocommerce style files (woocommerce-layout.css, woocommerce-smallscreen.css and woocommerce.css). So I don't understand why the styles don't get applied?
yashitamittal11
MemberHello,
1. I am able to change WooCommerce styles using wp_add_inline_style
Code that goes in functions.php-function my_styles_method() { if (is_woocommerce()) { $custom_css = " .woocommerce .site-inner div.breadcrumb span.breadcrumb-link-wrap a { text-decoration: none; color: pink; } .archive-title { display: none; }"; wp_add_inline_style( 'custom-stylesheet', $custom_css ); } } add_action( 'wp_enqueue_scripts', 'my_styles_method',11);
I would like to know, is this the correct method if I need to add more styles. So much styling is now in functions.php file.
2. The other problem you mentioned is the order in which the stylesheets are loaded. But when I look in the Developer - View Source, custom.css is loaded after the Woocommerce style files (woocommerce-layout.css, woocommerce-smallscreen.css and woocommerce.css). So I don't understand why the styles don't get applied?
yashitamittal11
MemberHello
I have identified the issue.
When WooCommerce is deactivated, following scripts load (View-Developer-Source)<script type='text/javascript' src='http://localhost/wp-content/plugins/genesis-responsive-slider/js/jquery.flexslider.js?ver=0.9.5'></script>
And when WooCommerce is activated, following scripts load,
<script type='text/javascript' src='//localhost/wp-content/plugins/woocommerce/assets/js/flexslider/jquery.flexslider.min.js?ver=2.6.1'></script>
As the jquery.flexslider.js for Genesis Responsive slider does not load when WooCommerce is activated, the slider does not work.
So, I have dequeued the Woocommerce flexslider,wp_dequeue_script( 'flexslider' );
I manually copied the js for Genesis Responsive slider in my theme and included in
wp_enqueue_script( 'genesis-res-slider', get_stylesheet_directory_uri() . "/js/jquery.flexslider.js", array( 'jquery' ), CHILD_THEME_VERSION, true );
Now the slider is working fine.
Please tell me a clean way to include the js for Genesis Responsive slider. Do I need to do it manually.Thanks
yashitamittal11
MemberHello
When I removed the WooCommerce handles from the home page, I also added this line,
wp_dequeue_script( 'flexslider' );
.
I think this was causing the slider to not load at all. I have now commented out this line.
The issue is the same. On deactivating WooCommerce, slider works fine.I don't know how to proceed with this issue.
yashitamittal11
MemberHello,
Genesis Responsive Slider is still not displaying. Upon searching I found that, WooCommerce interferes with the sliders sometimes.
So I want to conditionally load the WooCommerce scripts and styles.
I have found the handle of all the scripts and styles loaded using the code:# Finding handle for your plugins function display_script_handles() { global $wp_scripts; if(current_user_can('manage_options') && ! is_admin()){ # Only load when user is admin foreach( $wp_scripts->queue as $handle ) : $obj = $wp_scripts->registered [$handle]; echo $filename = $obj->src; echo ' : <b>Handle for this script is:</b> <span style="color:green"> '.$handle.'</span><br/><br/>'; endforeach; } } add_action( 'wp_print_scripts', 'display_script_handles' );
Script Handles found for WooCommerce:
Handle: wc-add-to-cart Handle: woocommerce Handle: wc-cart-fragments Handle: flexslider
Style Handles found for WooCommerce:
Handle: woocommerce-layout Handle: woocommerce-smallscreen Handle: woocommerce-general Handle: genesis-sample-woocommerce-styles
I am trying to remove these WooCommerce handles conditionally using the code:
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); function child_manage_woocommerce_styles() { //remove generator meta tag remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); //first check that woo exists to prevent fatal errors if ( function_exists( 'is_woocommerce' ) ) { //dequeue scripts and styles if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { wp_dequeue_script( 'wc-add-to-cart' ); wp_dequeue_script( 'wc-cart-fragments' ); wp_dequeue_script( 'woocommerce' ); wp_dequeue_script( 'flexslider' ); wp_dequeue_style('woocommerce-layout'); wp_dequeue_style('woocommerce-smallscreen'); wp_dequeue_style('woocommerce-general'); wp_dequeue_style('genesis-sample-woocommerce-styles'); } } }
Even after removing all the WooCommerce scripts and styles on the homepage, Genesis responsive slider is not working.
Please suggest what can be the issue.
yashitamittal11
MemberI have added
define( 'WP_MEMORY_LIMIT', '256M' );
this line in wp-config.php.
This has solved the fatal error.
But the Genesis responsive slider is still not working.I don't understand why deleting the page-product.php showed me the actual error.
yashitamittal11
MemberAs soon as I activate WooCommerce, Dashboard shows white screen with the fatal error, so I am not able to set default pages for WooCommerce or install any other plugins.
yashitamittal11
MemberHello,
I was working with custom post type for product and I noticed a file named
page-product.php'
that I have created earlier. As I am not using CPT anymore, I deleted the file.
Now when I am trying to access the wp-admin, I am getting this error.Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 49152 bytes) in /hermes/bosnaweb20a/b2498/ipg.greeninvitescom1/wp-admin/includes/media.php on line 371
yashitamittal11
MemberThere was extra margin under each masonry item which was causing the issue.
Removing that solved the issueyashitamittal11
MemberHello,
The problem with the post title not displaying has been fixed. There was issue in the markup.
Now I have another problem in the masonry on Products page.
The last masonry item in the first column is spilling to 2nd column. The post title 'YG1 Tools' is at the beginning of 2nd column.
I am having hard time fixing this.What changes I need to make to fix this.
yashitamittal11
MemberThanks,
I have added posts_per_page => -1 to the $args array. It is now showing all the posts.
There is one more issue that I am facing.
I am using get_the_title(); function in the code above to display post title beneath the featured post in the masonry. But somehow title is not displaying. When I go and check in the Inspect window, get_the_title(); is commented.
Please advice.
yashitamittal11
MemberThanks,
The solution solved my first problem.
Please advice on 2nd issue.yashitamittal11
MemberWhen I try to open MG Tools, only the text shows initially. Then after 2-3 seconds, images in the responsive slider loads.
For these first few seconds the site doesn't look good.What can I do to improve this?
yashitamittal11
MemberThanks
That solved the problem.
yashitamittal11
MemberHello Victor,
Thanks for the direction.
I am new to wordpress and in learning stage.
I wanted to add my custom.js file and mistakenly I added it in responsive-menu code which was not letting the menu to function properly.function genesis_sample_enqueue_scripts_styles() { wp_enqueue_style( 'genesis-sample-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700', array(), CHILD_THEME_VERSION ); wp_enqueue_style( 'dashicons' ); $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . "/js/responsive-menus{$suffix}.js", array( 'jquery' ), CHILD_THEME_VERSION, true ); wp_enqueue_script( 'mgtools_custom_js', get_stylesheet_directory_uri() . "/js/custom.js", array( 'jquery' ), CHILD_THEME_VERSION, true ); wp_localize_script( 'genesis-sample-responsive-menu', 'genesis_responsive_menu', <strong>//'mgtools_custom_js',</strong> genesis_sample_responsive_menu_settings() ); //Loading different style sheet after applying customisations for MG Tools wp_enqueue_style( 'custom-stylesheet', get_stylesheet_directory_uri() . '/custom.css', array(), CHILD_THEME_VERSION ); }
I have commented out that line and menu is now responsive.
Thanks
-
AuthorPosts