Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #1268694

    Hi, i need to vary the language + link of the privacy policy link in my socket for Dutch / English. How do I do that so that on pages in Dutch the Dutch socket is displayed and on pages in English the Englisch socket is displayed?

    Many Thanks

    #1269003

    Hey Alexander2021,
    To do this please create both links in your socket copyright field, and add a custom class to each link like this:
    <a class="nl" href="/privacyverklaring/">Privacy Verklaring</a><a class="en" href="/en/privacy-policy/">Privacy Policy</a>
    Then we will use this css to hide the links individually based on language:

    html[lang="en-GB"] #socket .nl {display: none;}
    html[lang="nl-NL"] #socket .en {display: none;}

    Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field.
    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1269049

    Okay,
    A problems occurred when i change the copyright info (socket) via theme options: all of a sudden my images are gone from the header and from the slider on the front page.

    when I empty the copyright info the images do not re-appear. So there is a bug.

    I experienced this several other times when editing the socket / copyright info on my site and there was no undo; i had to restore from back up

    please check, use temporary login in private content

    #1269051

    in addition: all content seems to have disappeared from the home pages, both NL and UK

    #1269053

    to have the shortcode option on polylang first add this to your child-theme functions.php:

    function polylang_shortcode($atts, $content = null){
    	if (empty($content))
    	return '';
    	extract( shortcode_atts( array('lang' => ''), $atts ) );
    	if (empty($lang))
    	return "<h3>You must specify 'lang' using shortcode: polylang</h3>";
    	return ($lang == pll_current_language()) ? $content : '';
    }
    add_shortcode('polylang', 'polylang_shortcode');

    after that you can insert this :
    [polylang lang="en"]english content[/polylang][polylang lang="de"]deutscher Inhalt[/polylang][polylang lang="nl"]Nederlandse inhoud[/polylang]

    #1269059

    @Guenni007: the class option that Mike suggested worked fine. It is just that something happens to the visibility of the content after editing the copyright / socket via theme opions

    #1269101
    This reply has been marked as private.
    #1269102

    did you try my solution?
    that in copyright field
    [polylang lang="en"]<a href="/en/privacy-policy/">Privacy Policy</a>[/polylang][polylang lang="nl"]<a href="/privacyverklaring/">Privacy Verklaring</a>[/polylang]

    with that snippet mentioned above in child-theme functions.php

    function polylang_shortcode($atts, $content = null){
    	if (empty($content))
    	return '';
    	extract( shortcode_atts( array('lang' => ''), $atts ) );
    	if (empty($lang))
    	return "<h3>You must specify 'lang' using shortcode: polylang</h3>";
    	return ($lang == pll_current_language()) ? $content : '';
    }
    add_shortcode('polylang', 'polylang_shortcode');
    #1269106

    @guenni007: yes I tried that as well; same problem :-(

    #1269304
    #1269310

    Hi, I tried that, but no changes :-(

    #1269320

    Hi,

    @Guenni007
    thank you for pointing out this solution, and the jQuery Migrate issue.

    @Alexander2021
    thanks for posting a login token by it didn’t work for me. Anyways, I see this error in the browser console:
    Uncaught SyntaxError: Unexpected token '!' >> siteground-optimizer-combined-js-cb7bf8c77e4408bb1dc8aa56163b4b79.js:77
    Please disable all caching and check again, but you may also want to try the jQuery Migrate solution @Guenni007 linked to above.
    I’m glad to hear that you liked the solution I posted, but you may find @Guenni007’s solution better because you can easily wrap any text with the shortcode to hide based on language, [polylang lang="en"]...[/polylang], just a suggestion.

    Best regards,
    Mike

    #1269327

    Hi Mike,

    I tried switching off caching & also tried the other solution (jQuery Migrate plugin), but nothing works.

    Can I retry sending you a login token so you can have a look inside?
    Can you provide me with an email adress i can use for generating this token?

    Thanks, Alexander

    • This reply was modified 3 years, 11 months ago by Alexander2021.
    #1269413

    Did you pay attention of the jQuery Migrate Plugin settings: load 1.12.4 legacy jQuery

    #1269533

    Hi,
    Thank you I found that the login token is now working so I checked your site and disabled your Enfold Theme Options > Performance > JS & CSS file merging and compression and enabled your Enfold Theme Options > Performance > Delete old CSS and JS files, and this seems to have solved the issue, please clear your browser cache and check.

    Best regards,
    Mike

    #1269544

    Hi Mike,

    Many thanks, that works!

    Do you know the cause? Could it be the use of the siteground optimiser plugin?

    Alexander

    #1269554

    Hi,
    I believe that the “stacking” of caching & minifying, along the line developed an error, you can try activating them again and they will most likely work correctly, but I would recommend to only do so when you are done building the site. Or at least do a complete cache purge in the theme settings and your plugins, and in your browser, after major edits. 👍
    Unless there is anything else we can assist with on this issue, shall we close this then?

    Best regards,
    Mike

    #1269562

    Hi Mike,
    Yes, this item can be closed :-)
    Thanks, Alex

    #1269688

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 19 posts - 1 through 19 (of 19 total)
  • The topic ‘polylang in socket’ is closed to new replies.