Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Customize Byline for each post? (http://forum.bytesforall.com/showthread.php?t=6363)

vrinda Mar 20, 2010 12:21 PM

[SOLVED] Customize Byline for each post?
 
Hi,

Thanks for the great theme!

I was hoping to customize the byline. Specifically, I would like to change the author with text added in a custom field (so that I don't have to create a new user for each author).

I found some code that works in another blog I have, but for some reason it is breaking Atahualpa when I post the code in functions.php. Does anyone have some code that changes the author in the byline? Or does anyone have any idea why the code below isn't working:

PHP Code:

add_filter'the_author''guest_author_name' );
add_filter'get_the_author_display_name''guest_author_name' );

function 
guest_author_name$name ) {
global 
$post;

$author get_post_meta$post->ID'guest-author'true );

if ( 
$author )
$name $author;

return 
$name;} 


Thanks!

juggledad Mar 21, 2010 05:36 AM

Is this custom text coming from the post? if so, why not use the %meta% option in teh byline.

vrinda Mar 21, 2010 07:26 AM

It worked! Thank you so much! :)


All times are GMT -6. The time now is 01:47 PM.

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