WordPress.org

Support

Support » Themes and Templates » sidebar links coming up in own window

sidebar links coming up in own window

  • 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,

    Cat

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    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

    thanks.

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

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

    On a search of the forum I found an old post I made on this subject (forgot all about it)…
    http://wordpress.org/support/topic/6642#post-39860

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

    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.

    cat

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

    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 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘sidebar links coming up in own window’ is closed to new replies.
Skip to toolbar