Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 03: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, 07: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, 01: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 01: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 05:16 AM
Byline link not working (community 0.6) designer666 Post-Kicker, -Byline & -Footer 1 May 19, 2009 05:58 PM
Opening links in a new window HalfWayThere Atahualpa 3 Wordpress theme 7 Apr 15, 2009 06:53 PM
External Link in Byline Date cdevenish Post-Kicker, -Byline & -Footer 0 Mar 27, 2009 01:50 PM
Allow comments on opening page. WaterfrontGazette Comments, trackbacks & pings 1 Dec 18, 2008 08:09 PM


All times are GMT -6. The time now is 02:26 PM.


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