• Resolved Chris

    (@curbano1972)


    Hello,

    I know this has been asked repeatedly and answered even more times, but none of those worked for me. I’ve installed 4 plugins and none work… I’ve tried all of the code suggested and none work. Sorry for being blunt, but reading through all of those posts (and there were a lot!) people started getting rude because the same question was being repeated. I’m scared to keep downloading plugins because I do not want to mess up my page! My question is:

    How do I have a link on my WordPress page open up into a smaller window? Not a new tab. I’ve tried all of the “target=…..” and NONE work!!

    The page I am trying to fix is: https://www.website-startup.com

    As an EXAMPLE:

    If you scroll down just a tad, under the video is a heading: User-Friendly CP
    There is a link in the first sentence: Control Panel

    Say, just for example, I would like that link to open up into a smaller window with my original page behind it. How can I do this?

    If you suggest a plugin, please check to see if it compatible with WP 3.6.1 because the ones that were suggested in other posts were only compatible with 3.5.2 and the ones that claimed to be compatible with 3.6.1 did not work and I would rather not install any more plugins that do not work.

    I would GREATLY appreciate any suggestions or any code that you have to offer. Please understand that I am not very good at coding, I only know what I have researched and am self-taught. I beg you to forgive my ignorance.

    Anyone who provides a working solution, I will gladly wrestle an alligator diagnosed with lockjaw for your amusement! ??

    ~Chris

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thank you!!

    Hi guys,
    I agree great great plugin! I spent several hours looking for popup plugins, trying them out and getting extremely frustrated. It seems every other one was just designed to make very annoying ads, so its is very refreshing to find one that is not designed just to annoy people! Two things though….
    1st- I agree it could use more promotion, it never appeared while searching wp’s plugin page but that could just mean wp’s search hasn’t caught up with how great this is.
    2nd- A very very humble request/suggestion if you choose to do a update in the future. That is, allow users to embed video, music, playlists directly into the popup instead of making a new page for the popup to link to. I know several people have been looking for something that can do this and that doesn’t seem to be anything. So might be a nice addition. But again I’m just grateful for it now as is!
    Thanks a ton!

    -angus

    P.S. Cubecolour, you just seem like you have a great attitude which is wonderful for these forums! Trying to figure out my embed problem, I came across several forums where other members were just complete jerks and berated the whole concept while providing absolutely no help. So it was extra nice coming across this one, with such a entertaining/pleasant back and forth. You’re the type of moderator/member we need more of on here! Again Thanks!

    @anguscarter: If you require assistance then, as per the Forum Welcome, please post your own topic.

    This topic has been resolved.

    I love this plugin. You guys are a geniuses.

    I want to create a Popup window on my wordpress site my theme is “OptimizePress V2.1.8.1” I have certain pages on my site that I want to put these popups on.

    In Dreamweaver you use a behaviour called “Open Browser Window” to create the effect I am looking to create and it lets you set exact width and height of the new window and whether to have toolbars scrollbars etc show in the new window etc.

    I just want to know how to set this up on my site within my current theme.

    Any ideas?

    @cubecolour:
    how can I make the scripts you mentioned above in the first reply, to open all external links in popup window automatically?
    I’m using a permalink that is referring to the original article from other websites, so it is kind of impossible for me to apply that script for every post individually.
    I tried a script that opens all external links into a new window. That is great, but still not satisfying for me.

    Moderator cubecolour

    (@numeeja)

    daryous_1 if you look at the script that is enqueued in the solution given in my original reply:

    jQuery(document).ready(function($) {
       $('.popup').click(function() {
         var NWin = window.open($(this).prop('href'), '', 'scrollbars=1,height=400,width=400');
         if (window.focus)
         {
           NWin.focus();
         }
         return false;
        });
    });

    It is targeting elements with the class .popup as this is defined in the line:

    $('.popup').click(function() {

    to make ALL links open in a popup, you can try targeting any anchor tag rather than any elements with the popup class by changing that line to

    $('a').click(function() {

    however I expect this will be no good for your requirements as all links including internal ones will now open in a new window.

    Consequently we need a way to limit this to external links only.

    To target just external links, that line can be changed to

    $("a[href*='https://']:not([href*='"+window.location.hostname+"'])").click(function() {

    I’ve not tested this, but I think it should work as a modification of the solution I gave for the original question.

    This should really be wrapped up into a plugin, a forked version of the alligator popup plugin I created as a result of this topic with the change outlined above and the shortcode bits removed would probably be ideal.

    Alternatively you could add the code to a child theme, but it is generally a bad idea to add custom functions like this to a theme if you are not using a child theme.

    @cubecolour
    you are the KING…
    one last question: how do I change the popup window theme (the browser theme) into a beautiful one (like lightbox or fancybox)?

    Moderator cubecolour

    (@numeeja)

    that is not possible with this kind of popup as this technique creates a new browser window whereas a lightbox or fancybox popup creates an overlaid div inside the current window which can be targeted with css rules.

    Thank you, is that hard to do for external links?
    I mean, I have lightbox, but how can I let all external links open in lightbox automatically?

    Moderator cubecolour

    (@numeeja)

    There may be a way to use the snippet of jQuery I posted to target external links to trigger the lightbox, but you will need to ask the developer of the particular lightbox plugin you’re using.

    @cubecolour
    The lightbox creates a class called “lpb_secondary”. so if we add this class to Alligator popup, we might get what I want. but I don’t know how to add a “class” to the plugin.

    Dude awesome plugin!

    Hey wanted to ask if there was an option to have it open another url in main parent window, at the same time the pop up opens!

    In other words, you click on the text or button, the pop up window opens and then the main page (your blog) opens up another site below the plugin?

    Thanks

    Tom McLellan

    (@tomgrowthclickcom)

    @cubecolour – awesome plugin! Thank you!

    This worked wonderfully!

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Have link open a popup window in a smaller size’ is closed to new replies.