WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Different home slogans for different lanuages in Attitude theme (6 posts)

  1. herz84
    Member
    Posted 4 weeks ago #

    Hi,

    I just created a multi-language website using the Polylang plugin v.1.5.4 (www.patriciaverhagen.nl, add /en for the English version). The issue I’m facing now has to do with the home slogan (text in the grey bar below the picture) in the Attitude theme. How do I use a Dutch slogan for the Dutch website, and an English slogan for the English website? Right now, I don’t see the option to insert different slogans dependent on the language. Please advice.

    Thanks in advance!

    Cheers,
    Mirjam

    https://wordpress.org/plugins/polylang/

  2. tanver
    Member
    Posted 3 weeks ago #

    You can use something like
    if($currentlang=="en-CA"): ?>

    at an appropriate location in your themes header.php to test the current language and act accordingly.

  3. herz84
    Member
    Posted 2 weeks ago #

    Thanks for your reply, but can you please be more specific on what & where I should use the code you're suggesting? I'm not that familiair with PHP.

    Thanks!

  4. tanver
    Member
    Posted 2 weeks ago #

    I am sorry for the late response as I failed to note this message before. You need to use it in your themes header.php file, replacing the code used to display the logo.

    Always use child themes to implement such changes, they help you keep the original theme files safe and more importantly you can update them without ever fearing of getting your changes overwritten.
    Thanks!

  5. Seb81
    Member
    Posted 1 week ago #

    I'm not sure but if I understood correctly you can as well create a xml file making that option translatable within polylang language/strings page.

    Although that issue with Attitude theme has been discussed here on WPML forum : http://wpml.org/forums/topic/attitude-theme-making-the-home-page-slogan-theme-options-translatable/
    And it seems wpml team rewrote the header of the theme to make it work properly.

    Anybody with better knowledge than me might be able to tell from http://pastebin.com/e7w8RC8B if the xml is the easy solution, as option's name seems clearly visible.

    The solution provided by Tanver would work too, but you would need to 'hardcode' your slogans within a file, and do that for each changes... I tend to end up doing things like that too, as I'm not able to set correct solution, so I won't blame his solution more than I can afford to :) Although a proper solution imply to be able to set slogans from the admin, not editing files each time.

    Hope a skilled wordpressor will give you a hand, peace.

  6. herz84
    Member
    Posted 3 days ago #

    Sorry for the late reply, but Seb81, you saved the day! The solution provided by the WPML forum works perfectly for the Attitude theme and the Polylang plugin. Thank you so much for sharing!

Reply

You must log in to post.

About this Plugin

About this Topic