Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mail2mohsen

    (@mail2mohsen)

    it was inline css overriding my styles and i got over it by using !important.

    thx guys..

    Hello agian @oceanwp author.

    thank you for your reply. i was trying to create a child theme using new method functions.php and custom css file and just found that i have enqueued wrong css file at the beginning of my functions.php inside my child theme.

    after searching everywhere according to your comment on main style on your version of functions.php and child theme description available in codex, and with the help of learning to use inspect :D, i was able to solve my mistakes.

    So thank you for your great theme again ??

    Hi
    i just tried your instructions on my persian web site and i cant get it going.
    can you please kindly help me as i’m a beginner in the field?
    <?php

    function my_theme_enqueue_styles() {

    $parent_style = ‘oceanwp’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen 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’ );

    function oceanwp_child_enqueue_rtl_style() {
    // Dynamically get version number of the parent stylesheet
    $theme = wp_get_theme( ‘OceanWP’ );
    $version = $theme->get( ‘Version’ );
    // Load the stylesheet
    if ( is_rtl() ) {
    wp_enqueue_style( ‘oceanwp-rtl’, get_template_directory_uri() . ‘/rtl.css’, array(), $version );
    }
    }
    add_action( ‘wp_enqueue_scripts’, ‘oceanwp_child_enqueue_rtl_style’ );

    /* https://css-tricks.com/methods-overriding-styles-wordpress/ */

    function my_custom_styles() {
    // Register my custom stylesheet
    wp_register_style( ‘custom-styles’, get_template_directory_uri() .’/custom-styles.css’ );
    // Load my custom stylesheet
    wp_enqueue_style( ‘custom-styles’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_custom_styles’ );
    ?>
    above is the content of functions.php used in my child theme.

    and this is the result so far >>> websicola.ir

    my second problem is that i dont know how i can modify some classes like clr or navigations because i cant find them in any css file used in oceanwp?

    thanks for your great theme… ??

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