WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Language Switcher
[resolved] Flags position in the Nav Bar (12 posts)

  1. missmandarin
    Member
    Posted 1 year ago #

    Hello!

    i love your plugin, and i managed to add it to my nab menu bar. my question is : is there a way to put the flags closer or are they controlled by the CSS each separately as if they were a simple menu point ?

    i'd like to have the 3 languages' flags close to each other but for now they seem like each flag is a separate menu.
    any guess?

    i copy pasted the code into the functions php and it works great :)
    thanks!

    http://wordpress.org/extend/plugins/multisite-language-switcher/

  2. missmandarin
    Member
    Posted 1 year ago #

    Uhm, just wanted to add: while the code works fine with one theme, it does not appear with the AVADA theme..

  3. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Seems you are using code like this:

    https://github.com/lloc/Multisite-Language-Switcher/wiki/Generate-the-output#manipulate-the-navigation-menu

    It is important to know the name of the menu which can differ from the name 'primary' which I used in my example. You could instead of

    $items .= '<li>' . implode( '</li><li>', $arr ) . '</li>';

    try a something link this

    $items .= '<li>' . implode( '', $arr ) . '</li>';

    Hope this helps,
    Dennis.

  4. missmandarin
    Member
    Posted 1 year ago #

    Hello Dennis!

    it does help for the flags to be closer :)

    but, in the AVADA 1.0 theme the flags still do not appear, though I used the same code in the functions.php..

    any guess?
    thanks again!

  5. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Look for a call to register_nav_menus in the functions.php of your theme. May be instead of 'primary' a menu with a slightly different name is registered there.

  6. missmandarin
    Member
    Posted 1 year ago #

    Actually i have no call like that in the functions php... :S

    Sorry..found it!

    OK it appears but listed as a list .. gonna have to change that. please help, i won't bother next time i promise :D

  7. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    OK, could you post this here?

  8. missmandarin
    Member
    Posted 1 year ago #

    http://www.ritafoldi.com/sitoprova/en/

    this is the site
    is that what you needed?

  9. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    In my opinion you could use in this case a line of code similar to the example above:

    $items .= '<li class="msls">' . implode( '', $arr ) . '</li>';

    The rest is just CSS - I think - because it seems that you need just to float the images resp. links.

  10. missmandarin
    Member
    Posted 1 year ago #

    i don t think i m gonna be able to do that :D i tried the line you gave me, yet it still appears "listed".

    maybe i could try to put the Links in the normal Menu writing US, IT, FR, but without images....

    thanks for your kind and super fast answers!

  11. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Oh, I thought CSS might not be a problem. You could - after the modification mentioned above - add also some line to your style.css. I have not checked this but it seems that the images in the menu are defined as display: block; so you could try to add this to your CSS:

    .msls img { display:inline-block; }

    But CSS is not really a strength of mine so you should ask a webdesigner (the theme-author for example).

  12. missmandarin
    Member
    Posted 1 year ago #

    thank you i will try to ask :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic