Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • @chris This still doesnt work for me mate, I am using woocommerce and after registration it goes straight into the rest of the pages.

    Also, is there a way to check is_user_approved or similar function I can call?

    Thank you!

    Thread Starter iwi4a

    (@iwi4a)

    I am really stuck with this ??

    Thread Starter iwi4a

    (@iwi4a)

    pls anyone help? ??

    I have the same issue, please help!

    I have the same issue, please help us!

    Thread Starter iwi4a

    (@iwi4a)

    Any ideas?

    Thread Starter iwi4a

    (@iwi4a)

    Thank you very much for your help, but I had to add a couple more things to work and I will explain below:
    My function.php in my childtheme looks like:

    <?php
    function jk_page_css() {
    
    	if ( is_page( 54 )){
    	wp_enqueue_style( 'stylee', get_template_directory_uri() . '../../childtheme/styleTwo.css' );
    /*the search for the file starts from the "storefront/inc" folder */
    }
    
    add_action( 'wp_enqueue_scripts', 'jk_page_css' );
    ?>

    and then nothing changes. The code is been executed first and then overriden from the main style.css, so the styleTwo.css can be used only for commands which are not mentioned in style.css UNLESS we use !important in our styleTwo.css like:

    .site-header {
      padding-top: 1em !important;
     }

    this worked for me, probably temporary because I will try to find a way to load it after the style.css so I can stop using !important for no reason.

    Thank you again!

    Thread Starter iwi4a

    (@iwi4a)

    Thank you very much for your help, but I had to add a couple more things to make it work and I will explain below:
    My function.php in my childtheme looks like:

    <?php
    function jk_page_css() {
    
    	if ( is_page( 54 )){
    	wp_enqueue_style( 'stylee', get_template_directory_uri() . '../../childtheme/styleTwo.css' );
    /*the search for the file starts from the "storefront/inc" folder */
    }
    
    add_action( 'wp_enqueue_scripts', 'jk_page_css' );
    ?>

    and then nothing changes. The code is been executed first and then overriden from the main style.css, so the styleTwo.css can be used only for commands which are not mentioned in style.css UNLESS we use !important in our styleTwo.css like:

    .site-header {
      padding-top: 1em !important;
     }

    this worked for me, probably temporary because I will try to find a way to load it after the style.css so I can stop using !important for no reason.

    Thank you again!

    Thread Starter iwi4a

    (@iwi4a)

    Hi @jameskoster
    Thats great but the file is in the same folder as the function.php. So that mean its going to look like `
    wp_enqueue_style( ‘contact-css’, get_stylesheet_uri() . ‘styleTwo.css’ );`
    Right?
    The css is empty, but even if I add something it still doesn’t work ??
    Also, while its empty is it not supposed to make the page look unstructured and all white?

    I believe I am really close but somehow I am missing something ??

    Thread Starter iwi4a

    (@iwi4a)

    You are awesome, thank you for trying to help me but I am missing something. I tried but the page still has the look of the original CSS ?? It could be with me and linking the custom css, its called styleTwo.css and its in the same folder as the function.php so I have done it like:
    wp_enqueue_style( 'custom', get_stylesheet_directory_uri() . 'styleTwo.css' );
    Is this right? I dont see another reason for not working.
    At the moment my custom css is empty, is this a factor?
    Is the styleTwo.css (custom) going to import the original style.css from the parent theme?

    I really appriciate your help!
    Thank you in advance!

    Thread Starter iwi4a

    (@iwi4a)

    You are awesome, thank you for trying to help me but I am missing something. I tried but the page still has the look of the original CSS ?? It could be with me and linking the custom css, its called styleTwo.css and its in the same folder as the function.php so I have done it like:
    wp_enqueue_style( 'contact-css', 'styleTwo.css' );
    Is this right? I dont see another reason for not working.
    At the moment my custom css is empty, is this a factor?

    Thank you in advance!

    Thread Starter iwi4a

    (@iwi4a)

    I apologize that my post is not in the right category and I appriciate the answer from @junaidrehman, but I have one more question

    So, I have blank(empty) file functions.php in my child theme. my code looks like:

    function theme_styles()
    {
    	wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css' );
    	wp_enqueue_style( 'custom', get_template_directory_uri() . '/custom.css' );
    	if(is_page('home')) {
    		wp_enqueue_style('custom');
    	}
    }
    add_action('wp_enqueue_scripts', 'theme_styles');

    So when I have this, nothing happens. It just comes on the screen. Btw my level is begginer and I am trying to understand and learn. Thank you in advance!

    Thread Starter iwi4a

    (@iwi4a)

    Okay I will take it there, so should I delete it from here?

Viewing 13 replies - 1 through 13 (of 13 total)