Tagged: 

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1297410

    Can someone explain to me how to add images to my secondary navigation. I want to add flags to the secondary navigation on the right
    English Español

    #1297547

    Hi merrywatson,

    It is automatically added once you are using WPML for translation.
    Please check the following:
    – Documentation: https://kriesi.at/documentation/enfold/translation/
    – Video: https://www.youtube.com/watch?v=fHwjObRRhN0

    Best regards,
    Nikko

    #1297816

    Do I need to purchase WPML plugin?

    #1297840

    Hi merrywatson,

    No, but you’ll need to use a child theme, you can download and find instructions in our documentation: https://kriesi.at/documentation/enfold/child-theme/
    Then in functions.php of the child theme, add this code:

    function add_flags_to_header()
    {
    	$output = "<ul class='custom_flags noLightbox social_bookmarks icon_count_2'>";	 
    		$output .= "<li><a href='ENGLISH_URL'>";
    		$output .= "	<span class='language_flag'><img title='English' src='ENGLISH_FLAG_IMAGE_URL' alt='English' /></span>";
    		$output .= "</a></li>";
    		$output .= "<li><a href='ESPANOL_URL'>";
    		$output .= "	<span class='language_flag'><img title='Español' src='ENGLISH_FLAG_IMAGE_URL' alt='Español' /></span>";
    		$output .= "</a></li>";
    	$output .= "</ul>";
    
    	echo $output;
    }
    add_action( 'ava_inside_main_menu', 'add_flags_to_header', 10 );

    just replace the following in the code:
    – ENGLISH_URL with the link in private content
    – ESPANOL_URL with the link in private content
    – ENGLISH_FLAG_IMAGE_URL (you’ll need to find an image of the flag, then upload it to Media Library and copy the URL and replace this one)
    – ESPANOL_FLAG_IMAGE_URL (same with ENGLISH_FLAG_IMAGE_URL)

    Then add this CSS code in Enfold > General Styling > Quick CSS:

    #top .custom_flags {
        padding-right: 20px;
    }

    Hope it helps.

    Best regards,
    Nikko

    #1298364

    I added the code on my staging site https://qgk.aff.myftpupload.com/ I added the code in the Private Content section
    I don’t see the flags.

    • This reply was modified 3 years, 7 months ago by Yigit. Reason: Fixed HTML
    #1298378

    Hi merrywatson,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( to be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1298385

    I added you as a user, using the email (Email address hidden if logged out) .
    This is on my staging site https://qgk.aff.myftpupload.com/
    If you do not receive the login credentials please let me know.

    #1298453

    Hi merrywatson,

    I did not receive it.
    Please post it here in private content, so any moderator can check it. :)

    Best regards,
    Nikko

    #1298583

    Here you go, I put my login in the private content.

    #1298586

    this is the website URL below in the private content

    #1298982

    Hi merrywatson,

    Thanks for giving us admin access.
    This is now showing properly, please review your site.

    The greater than and lesser than symbols were replaced with & g t ; and & l t ; (I just replaced it with the correct symbols)
    Then I have replaced this code:

    add_action( 'ava_inside_secondary_menu', 'add_flags_to_header', 10 );

    with:

    add_action( 'avia_meta_header', 'add_flags_to_header', 10 );

    Then to fix the alignment and adjust the flag size, I added this code in QUick CSS:

    #top .custom_flags {
        margin-top: -7px !important;
    }
    
    #top .custom_flags img {
        max-height: 16px;
    }

    Best regards,
    Nikko

    #1298986

    Thank you for this. One question when I go to the Spanish page in the secondary nav the flags are not there.

    Do I need to add additional code?

    #1298990

    Hi merrywatson,

    That’s because it’s a different domain, we have applied it here: https://qgk.aff.myftpupload.com/espanol/
    You’ll just need to do the same steps we did in https://qgk.aff.myftpupload.com/espanol/ for this domain: https://pimasters.com/espanol/

    Best regards,
    Nikko

    #1298991

    thanks, I understand.

    Mary

    #1298994

    Hi Mary,

    No worries, we’re just happy to help you.
    Just let us know if you need further assistance :)

    Best regards,
    Nikko

    #1299477

    Good morning, I am trying to find where the WPML plugin is.
    I have attached my login information in the Private Content.

    #1299529

    Hi merrywatson,

    You can’t find it in the Plugins, since it can be download and purchased in their site: https://wpml.org/
    I think you can try to checkout Polylang since it’s free.

    Best regards,
    Nikko

    #1299724

    I thought the WPML was part of the Enfold template? Are you saying I would need to purchase it? For a free one you are suggesting I use the Polylang.

    #1299797

    Hi merrywatson,
    WPML is a third party plugin and not part of Enfold but our theme supports it (some integrations), I apologize for not being clear.
    You can think of it similar to Woocommerce where it is a separate plugin (different author) but once you install and activate that plugin certain features in Enfold are unlocked (like additional elements).
    And yes, WPML is a paid plugin.

    Best regards,
    Nikko

    #1299958

    Thanks, I will look into using it.

    Mary

    #1300026

    Hi Mary,

    You’re welcome :)
    Just let us know if you still need further assistance regarding this topic or if we can close this thread.

    Best regards,
    Nikko

    #1300169

    Please close this thread and thanks for your help.

    Mary

    #1300268

    Hi Mary,

    We’re glad to hear that :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘adding flag images to my secondary navigation’ is closed to new replies.