Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

Byline link opening in new window


  #1  
Old May 5, 2009, 04:21 AM
ronald73
 
3 posts · May 2009
Hi all,

I have a website with lots of posts imported from other sites through rss. In the byline I have a link to the original author, using %author-link%. When you click the link it opens in the same window and so the visitor is gone. How do I make the link open in a new window?
  #2  
Old May 5, 2009, 08:29 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You#d have to edit bfa_postinfo.php for that

Replace
PHP Code:
// Author website link
if (strpos($postinfo_string,'%author-link%')!==FALSE) {
ob_start(); the_author_link(); $author_link ob_get_contents(); ob_end_clean();
$postinfo str_replace("%author-link%"$author_link$postinfo);

with
PHP Code:
// Author website link
if (strpos($postinfo_string,'%author-link%')!==FALSE) {
ob_start(); 
if (
get_the_author_url()) {
    echo 
'<a target="_new" href="' get_the_author_url() . 
    
'" title="' sprintf(__("Visit the website of %s"), get_the_author()) . 
    
'" rel="external">' get_the_author() . '</a>';
} else {
    
the_author();
}
$author_link ob_get_contents(); ob_end_clean();
$postinfo str_replace("%author-link%"$author_link$postinfo);

  #3  
Old May 6, 2009, 02:55 AM
ronald73
 
3 posts · May 2009
Thanks, but I'm using the latest version of atahualpa, but the code you suggest is nowhere to be found in bfa_postinfo.php.
Even the word 'website' isn't in the code, and I've also searched for 'if (strpos($postinfo_string,'%author-link%')!==FALSE)' but it's not there.
So for now, this doesn't work.

Update: it does work! I just found out there are 2 versions of bfa_postinfo.php

Thanks!

Last edited by ronald73; May 6, 2009 at 02:59 AM.

Bookmarks

Tags
author, link, window

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subscribe widget not opening in new window and won't center fredless Sidebars & Widgets 3 Jun 11, 2009 06:16 AM
Byline link not working (community 0.6) designer666 Post-Kicker, -Byline & -Footer 1 May 19, 2009 06:58 PM
Opening links in a new window HalfWayThere Atahualpa 3 Wordpress theme 7 Apr 15, 2009 07:53 PM
External Link in Byline Date cdevenish Post-Kicker, -Byline & -Footer 0 Mar 27, 2009 02:50 PM
Allow comments on opening page. WaterfrontGazette Comments, trackbacks & pings 1 Dec 18, 2008 09:09 PM


All times are GMT -6. The time now is 01:07 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.