Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • enatella

    (@enatella)

    I didn’t have to wait long ??
    PHP version updated and problem solved

    enatella

    (@enatella)

    I have the same problem. I tried to update the PHP version which was 5.2.14
    I will wait for the update and try again

    Thread Starter enatella

    (@enatella)

    The parent theme as long as I don’t use the child theme it works properly.
    The only strange thing is that it uploads two files style.css but in the correct folder.
    Only if I activate child theme doesn’t work properly.

    It looks like it doesn’t loads the template directory wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); but only the stylesheet directory wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') );

    Don’t you think it just depends on the function.php of the child theme?

    I’m doing something wrong

    Thread Starter enatella

    (@enatella)

    Sorry I didn’t understand. What should I do?

    I didn’t understand why it loads the file style.css twice, both with the parent and with the child theme.

    When I use the parent theme, WP load (twice) the file style.css from the wp-bootstrap-4 folder.

    When I activate the child theme load the style.css file (twice) from the child folder wp-bootstrap-4-child, not from wp-bootstrap-4-style

    How do I load both style.css files correctly?

    Thank you so much @joyously

    Thread Starter enatella

    (@enatella)

    When I deactivate the theme child, the style folder is wp-bootstrap-4, but when I activate it the folder is wp-bootstrap-4-style

    The source code of original theme.

    <link rel='stylesheet' id='wp-bootstrap-4-style-css'  href='domain/wp-content/themes/wp-bootstrap-4/style.css?ver=1.0.2' type='text/css' media='all' />
    <link rel='stylesheet' id='wp-bootstrap-4_no-kirki-css'  href='domain/wp-content/themes/wp-bootstrap-4/style.css' type='text/css' media='all' />

    The function.php file of theme enqueue/import the stylesheet in this way:

    ...
    wp_enqueue_style( 'wp-bootstrap-4-style', get_stylesheet_uri(), array(), '1.0.2', 'all' );
    ...
    
    • This reply was modified 5 years, 1 month ago by enatella.
    Thread Starter enatella

    (@enatella)

    @joyously

    Do you still have the @import in the style.css?

    Yes but nothing change

    Use your browser to view the source of the page to see what is being output in the <head> section.

    I see only child style resource but two times:

    <link rel='stylesheet' id='wp-bootstrap-4-style-css'  href='https://domain/wp-content/themes/wp-bootstrap-4-child/style.css?ver=1.0.2' type='text/css' media='all' />
    <link rel='stylesheet' id='wp-bootstrap-4-child_no-kirki-css'  href='https://domain/wp-content/themes/wp-bootstrap-4-child/style.css' type='text/css' media='all' />

    It’s best to ask at the theme’s support forum, in case the theme does something different than usual. (Like my theme, which loads the child style so the child doesn’t have to load anything.)

    Now I also ask them.
    Thank you

    Thread Starter enatella

    (@enatella)

    Thank you but unfortunately the code is well written on the function.php file.
    There was only a copying error here.

    <?php
    function my_theme_enqueue_styles() {
        $parent_style = 'wp-bootstrap-4'; // This is 'wp-bootstrap-style' for the wp bootstrap theme.
     
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

    This is the code, it’s correct?

    • This reply was modified 5 years, 1 month ago by enatella.
    • This reply was modified 5 years, 1 month ago by enatella.
    Thread Starter enatella

    (@enatella)

    I also tried to import parent stylesheet placing the following code on the child stylesheet
    @import url ('../themeName/style.css');

    Thread Starter enatella

    (@enatella)

    Now works
    thanks

    Thread Starter enatella

    (@enatella)

    I don’t know what happened but now works, I didn’t make any changes
    ???? ??
    however thanks for the tip
    bye

    Thread Starter enatella

    (@enatella)

    With chrome in the source-view i can see the css style in the <head>, so plugin works on. Any suggestions?

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