Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #174834

    Hey Guys,

    I want a featured image to open to a link in a separate window. Usually I’d use Go to website
    But the featured image link options don’t allow me to use this format. I can only write the url of the page to link to.

    How do I make the page open in a new window?

    rich

    #174849

    Hello rich,

    Open this file: /shoutbox/framework/php/function-set-avia-frontend.php, replace line 649:
    return "<a $attr href='".$url."'>".$inside."</a>";

    By this:
    return "<a $attr href='".$url."' target='_blank'>".$inside."</a>";

    Cheers!
    Josue

    #175366

    Hi Josue,

    Thanks for the tip. The problem is that the fix you posted is permanent, I assume? What I wanted was a way to just make the one specific link open into a new window, not every single link opening from a featured image.

    Thanks
    rich

    #175372

    Hola,

    Es posible, pero tienes que saber el ID de ese post especifico, el código al final seria así:

    if($post_id == 282){
    	return "<a $attr href='".$url."' target='_blank'>".$inside."</a>";
    }else{
            return "<a $attr href='".$url."'>".$inside."</a>";
    }

    Suponiendo que el ID del post que quieres que abra _blank sea 282.

    Saludos,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Web links to open in new window’ is closed to new replies.