sidebar links coming up in own window (8 posts)

  1. thecat
    Posted 9 years ago #

    This is the blog in question - http://www.designers-who-blog.com/

    I am trying to get the links in the sidebar to pop up in their own window. I know how to code for this when it's html, but this is php

    Below is the code in the sidebar template

    <div class="title"><?php _e('Designers on Design'); ?></div>
    <?php get_links('-1', '', '
    ', '
    ', 0, 'name', 0, 0, -1, 0); ?>

    thanks in advance,


  2. Beel
    Posted 9 years ago #

    Hold down the shift key and click the link like we all do when we want a new browser window ;-) But, if you insist on forcing popups on unsuspecting visitors, there are a number of threads here that describe how to do it using javascript in the header. Just do a search.

  3. thecat
    Posted 9 years ago #

    guess we have a difference of opinion. i stick to the rule of "inside the site stays in the site, outside the site gets a new window."

    i'll do a search but i did that first with no pleasure returned


  4. thecat
    Posted 9 years ago #

    actually, i believe what i need is help on the php, not java ...

  5. Beel
    Posted 9 years ago #

    No, you want javascript. target="_blank" is not xhtml valid so with javascript you can set links with rel="external" to do the popup.

  6. Beel
    Posted 9 years ago #

    On a search of the forum I found an old post I made on this subject (forgot all about it)...

    (I stick to the rule of "viewer choice" and quickly leave sites that force a popup on me)

  7. thecat
    Posted 9 years ago #

    well, nowhere do i see where i can add 'rel="external' in the links manager to do the popup. one puts the url in and ... there no way to edit anything that i can see.
    [i am very new at wp. not sure where everything is yet or when i should bounce into bits to do this or that]

    what i did find was if you scroll waaaaaaaay down in 'manage links' one can add target _blank

    yes, i know, i'm breaking rules here, but they should make it easier if they want us to be all legal like

    btw - i am not talking about the links throughout the site I am adding on the fly. I can do those fine. i am talking about the links that are input via the links manager. i tried putting code in with them and the code comes up in the link title.

    and looks like your code needs 'rel="external' for it to work

    << The link to their site has rel="external" in it so you can use javascript to do that.


    skill level:
    css [can get by with assistance in tough times]
    java - none
    php - none

  8. Beel
    Posted 9 years ago #

    If you want to maintain compliant code (don't want to use target="_blank") you will have to edit the code I posted to use something like rel="muse". Short of editing core files and adding "external" as an option, this is a simple workaround for Links Manager.

    (This is sorta like a vegetarian posting a recipe for vension stew ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic