open post links in new window (css gallery)

Place for WordPress Themes related issues

open post links in new window (css gallery)

Postby tronicscribe on Sat Apr 26, 2008 7:17 pm

is there a way to set it so when you click the thumbnail it will open the website in a new window? or do I have to go into every post and set a target=_blank for each post? thanks.
tronicscribe
 
Posts: 17
Joined: Thu Apr 24, 2008 11:50 pm

Re: open post links in new window (css gallery)

Postby Shabu on Sat Apr 26, 2008 7:41 pm

target=_blank will do the job for you. Just add it on your theme pages where it's required.
Your donation will keep alive the free templates and support.
Don't contact me by email for support, email will be ignored.
User avatar
Shabu
Site Admin
 
Posts: 67
Joined: Wed Apr 23, 2008 8:35 am
Location: Dhaka, Bangladesh

Re: open post links in new window (css gallery)

Postby tronicscribe on Sat Apr 26, 2008 7:44 pm

I'm not sure what you mean by add it on my theme pages. is there a place in the code that I add it so it will always open in a new window? or do I have to add it in every post that I make? thanks a bunch for all your help.
tronicscribe
 
Posts: 17
Joined: Thu Apr 24, 2008 11:50 pm

Re: open post links in new window (css gallery)

Postby Shabu on Sat Apr 26, 2008 8:17 pm

No, you don't need to add _blank in every post, you need to edit a few files.

I'll post the code and file names tomorrow. Right now I'm in home.

Zzz.....
Your donation will keep alive the free templates and support.
Don't contact me by email for support, email will be ignored.
User avatar
Shabu
Site Admin
 
Posts: 67
Joined: Wed Apr 23, 2008 8:35 am
Location: Dhaka, Bangladesh

Re: open post links in new window (css gallery)

Postby tronicscribe on Sun Apr 27, 2008 3:21 am

ok thank you, that would be great. :D
tronicscribe
 
Posts: 17
Joined: Thu Apr 24, 2008 11:50 pm

Re: open post links in new window (css gallery)

Postby Shabu on Sun Apr 27, 2008 7:57 am

File Names:
index.php, archive.php, search.php

Find:
Code: Select all
<p><a href="<?php $values get_post_custom_values("url"); echo $values[0]; ?>" title="<?php the_title(); ?>">
<img src="<?php $values get_post_custom_values("thumbs"); echo $values[0]; ?>" alt="<?php the_title(); ?>" /></a></p>


Replace with:
Code: Select all
<p><a href="<?php $values get_post_custom_values("url"); echo $values[0]; ?>" target="_blank" title="<?php the_title(); ?>">
<img src="<?php $values get_post_custom_values("thumbs"); echo $values[0]; ?>" alt="<?php the_title(); ?>" /></a></p>
Your donation will keep alive the free templates and support.
Don't contact me by email for support, email will be ignored.
User avatar
Shabu
Site Admin
 
Posts: 67
Joined: Wed Apr 23, 2008 8:35 am
Location: Dhaka, Bangladesh

Re: open post links in new window (css gallery)

Postby thkiat on Sat Jun 28, 2008 7:00 pm

Hi, Shabu,
The solution you gave is for clocking on thumbs (at http://www.bestcssgallery.com/) and the link will open in new windows.
How about clicking on image (at http://www.bestcssgallery.com/web-devel ... heckup.htm) and the link will open in new windows?

By the way, how can i make the url end with .htm like www.bestcssgallery.com/web-development/web-checkup.htm from www.bestcssgallery.com/web-development/web_checkup/ ?

TQ!
thkiat
 
Posts: 3
Joined: Sat Jun 28, 2008 6:46 pm


Return to WordPress Themes

Who is online

Users browsing this forum: No registered users and 1 guest

cron