WordPress.org

Forums

WordPress PopUp
[resolved] No work with url language (12 posts)

  1. fabio zoratti
    Member
    Posted 1 year ago #

    I have only an image with a bitmap text and a second image with a traslation I need two pop up and two links but When I put a url with '?lang=en/' don't work.
    http://www.segreen.com/ if you change language not see a popup

    thanks for your help

    https://wordpress.org/plugins/wordpress-popup/

  2. David
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @fabio zoratti,

    Greetings and thanks for posting! :)

    Could you let us know what you're using for the language translations? Another plugin solution?

    Also, could you maybe try the other loading methods at Pop Overs > Settings to see how it works with that?

    Thanks,
    David

  3. fabio zoratti
    Member
    Posted 1 year ago #

    I have a WPML plugin. I try with other setting but not work.

  4. WPMU DEV
    Member
    Posted 1 year ago #

    Hi @fabio zoratti,

    Are you using any pop up condition?

    Could you please share me the screenshot of your pop up settings so that i can troubleshoot it?

    You can share me a screenshot of it by uploading the screenshot on any image sharing website like http://imgur.com/ and sharing its unique URL here.

    Kind Regards,
    WPMU DEV

  5. fabio zoratti
    Member
    Posted 1 year ago #

  6. ehelry
    Member
    Posted 1 year ago #

    Hi guys!

    After I upgrade to WP 3.9 specific url stopped working. The plugin is the latest version and I've tried all loading methods. The URL has a parameter like "?lang=en".

    Thanks in advance.

  7. David
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi guys,

    I've been looking into this one and unfortunately, the issue is that the Pop Up plugin currently accepts only direct URLs, which doesn't include URL parameters like "?lang=en".

    It's basically explained through this post by one of the developers:
    http://premium.wpmudev.org/forums/topic/how-to-display-popup-in-a-specific-page#post-645332

    I'm afraid I don't know know a way around this except maybe with some custom JavaScript like noted here:
    http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html

    Given that, I think something like this could work:

    function popover_url_parameters() {
    	if ( wp_script_is( 'jquery', 'done' ) ) {
    ?>
    	<script type="text/javascript">
    	// getUrlParameter() function from http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html
    	function getUrlParameter(sParam) {
    		var sPageURL = window.location.search.substring(1);
    		var sURLVariables = sPageURL.split('&');
    		for (var i = 0; i < sURLVariables.length; i++) {
    			var sParameterName = sURLVariables[i].split('=');
    			if (sParameterName[0] == sParam)
    				return sParameterName[1];
    		}
    	}
    	jQuery( document ).ready(function() {
    		var lang = getUrlParameter('lang');
    		if (lang == 'en') {
    			jQuery( 'div.visiblebox' ).hide();
    	}
    	});
    	</script>
    <?php
    	}
    }
    add_action( 'wp_footer', 'popover_url_parameters' );

    That could be added to your theme's functions.php file or using this:
    http://wordpress.org/plugins/code-snippets/

    That particular snippet should hide the popover if the "lang" parameter is equal to "en".

    The issue though, is that you'd need to customize that sort of code to work with your particular site.

    Does that sound viable to you?

    Cheers,
    David

  8. ehelry
    Member
    Posted 1 year ago #

    Hi, David!

    I try to use the code below, but don't work.
    I uninstalled the current version of the plugin and installed the old version 4.3.2 (the version of wordpress is 3.9) and it worked perfectly.
    Added the URLs ending with "/? Lang = en" and "/? Lang = es" conditions specific URL. The case would be to have a Popup in every language of the site.

    Thank you anyway!
    Helry

  9. fabio zoratti
    Member
    Posted 1 year ago #

    I have enabled the management of the url with languages ​​without parameters "?lang=en" and it work http://www.segreen.com/en/

  10. David
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @fabio zoratti, awesome! Thanks for letting us know that solution worked, I wasn't quite sure if WPML had that as an option. Really good to hear it does and that it works for you.

    The snippet I provided can work, though it would likely require some customization to get it to work exactly how you like.

    Hi @ehelry, could you maybe try that non-parameter option that @fabio mentioned? Would that work for you?

    I've not tried that previous version with the parameters but that non-parameter option does appear to work. :)

    Cheers,
    David

  11. stosun
    Member
    Posted 11 months ago #

    Hi,
    I also want to use this plugin with WPML.
    Could you explain more the non-parameter option mentioned above?
    I think I have to create two pop overs, but which conditions have I to add them?
    My sites are like ; http://www.mysite1.com and http://www.mysite2.com/en/
    Regards

  12. WPMU DEV
    Member
    Posted 11 months ago #

    Hi @stosun,

    Greetings and thanks for posting on the forums.

    To help keep support tickets separate, could you please open a new thread for your new question? http://wordpress.org/support/plugin/wordpress-popup

    This helps to prevent any confusion as I'm sure you understand, this might also help other members looking for a similar answer. :)

    As per the Forum Welcome, you should post your own topic.

    Have a great day!

    Cheers,
    WPMU DEV

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress PopUp
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.