Child theme style is adjusted lately.

Home Forums Legacy Support Support queries Styling issues Child theme style is adjusted lately.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #35312
    hodoogwaja
    Participant
    Hello. I'm using my own child theme.   But it take time to show child theme style after parent style. Especially course page. So user see parent style(don't want show this) during 0.5 second. How can i show only child theme style??  
    #35459
    Anshuman Sahu
    Keymaster
    Can you please share a demonstration  video for that . For me i was only able to see the issue with the header . In transparent header it calculates the height of header and ten adjusts padding form the top of the title area .
    #35510
    hodoogwaja
    Participant
    Hello Alex. Please refer this. http://www.hodoogwaja.com/child-theme-style-load/ Because child theme style load later than parent, it looks bad. How can i fix this? Plz help me.
    #35514
    I just use 'wp_dequeue_style' to remove their style and 'wp_enqueue_style' to add my own earlier in the queue. See if that works for you.
    #35516
    hodoogwaja
    Participant
    Hello urdek. Thank you for answer. But if use 'wp-dequeue-style', site look mass becaouse parent style disappeared. Doesn't you??
    #35562
    Yes, that's why you also need to add your own style using 'wp_enqueue_style' as pointed in my previous reply. Right now the child theme style loads in the footer, so after the parent theme is applied, it loads all page's content and then apply the child theme style. So if you add it early in the queue (preferably right after parent style) this glitch shouldn't happen.
    #35579
    hodoogwaja
    Participant
    Thank you kindly direction. :) I understand how it works. Can you show me some example code ? It will be very grateful for me.
    #35783
    // REMOVE STYLE function cdctps_remove_child_theme_style() { wp_dequeue_style( 'wplms_child_theme_style' ); } add_action( 'wp_head', 'cdctps_remove_child_theme_style', 20 ); // ADD YOUR STYLE function cdctps_add_child_theme_style() { wp_enqueue_style( 'your-custom-css', get_stylesheet_directory_uri().'/style.css',array('wplms-style')); } add_action( 'wp_enqueue_scripts', 'cdctps_add_child_theme_style', 20 );
    #35894
    H.K. Latiyan
    Participant
    Thanks for sharing the information here.
    #35987
    hodoogwaja
    Participant
    Thank you so much urdek. :D
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Child theme style is adjusted lately.’ is closed to new replies.