• Resolved dmeljon

    (@dmeljon)


    Hi,
    I’m using your header on my website. website is setup as RTL and all looks good.
    problem is on the menu items on PC – they are in the opposite order as they setup in the Appearance -> Menus settings.
    on mobile, they are ordered as they should. problem is only on desktop.
    any solution?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, do you use a child theme? If yes, you need to call the RTL file like this: https://docs.oceanwp.org/article/455-add-the-rtl-style-to-the-child-theme

    Thread Starter dmeljon

    (@dmeljon)

    thanks, works well.
    but now, how can i switch positions between site logo and menu?

    Theme Author oceanwp

    (@oceanwp)

    You’re welcome ??
    What do you mean for your logo and menu?

    Thread Starter dmeljon

    (@dmeljon)

    On OceanWP header, the logo is on the right side of the bar and the navigation menu is on the left. Is there a way to switch the sides?
    I want the logo to be on the left and the navigation on the right.

    Theme Author oceanwp

    (@oceanwp)

    Yes, sure, send me your site url, I will give you the css code.

    Thread Starter dmeljon

    (@dmeljon)

    Its on maintenance mode, how can i send you login access privately?
    or just tell me when you can check it and i will remove maintenance for 2 minutes.
    thanks.

    Theme Author oceanwp

    (@oceanwp)

    No problem ??
    Try this css code:

    body #site-logo {
        float: left;
    }
    body #site-navigation-wrap {
        float: right;
        right: -15px;
        left: auto;
    }
    body .oceanwp-mobile-menu-icon.mobile-right {
        float: right;
    }

    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… ??

    Theme Author oceanwp

    (@oceanwp)

    Hello @mail2mohsen, what exactly do you want to do?

    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 ??

    Theme Author oceanwp

    (@oceanwp)

    Hello @mail2mohsen, glad to hear that ??
    Feel free to reach me again if you have a problem.

    Hi
    I am new in wordpress, for my first experience I’ve chose oceanwp to create my persian web site. To modify it I’ve activated child theme but i don’t know how to add new style to it. would you explain for how to add style (font, rtl styles…)?
    thank you in advance:)

    Hello again:)
    in addition to my previous question:
    this the php code:
    function oceanwp_child_enqueue_parent_style() {

    $theme = wp_get_theme( ‘OceanWP’ );
    $version = $theme->get( ‘Version’ );
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘oceanwp-style’ ), $version );

    }
    add_action( ‘wp_enqueue_scripts’, ‘oceanwp_child_enqueue_parent_style’ );

    I added some css code to style.css but it didn’t work.

    Theme Author oceanwp

    (@oceanwp)

    Hello @anorouzey, if you have downloaded the child theme from github, you just need to add css code in the style.css file of the child theme and it will work, have you checked on a private browser to be sure that it is not your browser cache?

    Hello @oceanwp
    thank you:)

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Menu Item are LTR on RTL layout’ is closed to new replies.