<h2>
<?php the_author_meta(‘user_firstname’); ?> <?php the_author_meta(‘user_lastname_1’); ?> <?php the_author_meta(‘user_lastname_2’); ?></h2>
Obviously there is currently no field for a middle or second last name, so I would either need to implement a field, or use static content.
]]>I’ve managed to move the <footer class=”entry-meta”> so that it’s above the post itself, looks awful tho the white space between the title and entry_meta is to big (the height) i even managed to still have the <div class=”comments-link”> the comments_popup_link placed at the bottom of a post (like i want), but the author_meta is now placed above the post (grmbl) instead. My php savviness ain’t good enough to separate those three alien entities so it’s manageable in a easy way.
How do i get the entry_meta to the top of a post, right under the post title, without the white space and still have the author_meta under the post?
have a looksee at https://www.dravel.se landing page and you’ll see the white space issue, an just click on the post to see where the author_meta is now.
]]>I’ve added author bios (descriptions) to single posts using author_meta description. Like so:
<?php the_author_meta('description') ;?>
which works great, but I’d also like for these descriptions to show up in the sites RSS feed for each post (so each post would have the author’s bio in it). Any ideas are appreciated. Thanks!
]]><?php
if(empty($_REQUEST['enterCodeId'])){
echo "<script>
location.replace('".$_SERVER['HTTP_REFERER']."');
</script>";
}else{
$getId=substr($_REQUEST['enterCodeId'], 4, 10);
$querystr ="SELECT ID FROM wp_7d8ftw_users WHERE ID='".$getId."'";
$querystrChecking = mysql_query($querystr);
if(mysql_num_rows($querystrChecking)<=0){
echo "<script>
location.replace('".$_SERVER['HTTP_REFERER']."');
</script>";
}
$uploads = wp_upload_dir();
//
}
?>
<?php get_header(); ?>
<div id="wrapper2nd" class="inner">
<div class="content" id="inner">
<h1>PROFILE</h1>
<div id="profileView">
<div class="alignLeft">
<strong> Name:</strong> <?php the_author_meta( 'first_name', $getId ); ?> <?php the_author_meta( 'last_name', $getId); ?><br />
<strong> Nick Name:</strong> <?php the_author_meta( 'nickname', $getId ); ?><br />
<strong>Age:</strong><?php echo date("Y")-date("Y",get_the_author_meta( 'dateofbirth', $getId ));?><br />
<strong>Birthday: </strong>
<?=date("D M Y",get_the_author_meta( 'dateofbirth', $getId ));?><br />
<strong>Birthplace:</strong>
<?=get_the_author_meta( 'birthplace', $getId );?><br />
<strong>Current City:</strong>
<?=get_the_author_meta( 'currentcity', $getId );?> <br />
<strong>Favourite Colour:</strong>
<?=get_the_author_meta( 'favouritecolour', $getId );?> <br />
<strong>Favourite Book:</strong>
<?=get_the_author_meta( 'favouritebook', $getId );?><br />
<strong>Favourite Film:</strong>
<?=get_the_author_meta( 'favouritefilm', $getId );?><br />
<strong>Favourite Restaurant: </strong>
<?=get_the_author_meta( 'favouriterestaurant', $getId );?><br />
<strong>Favourite Quote:</strong>
<?=get_the_author_meta( 'favouritequote', $getId );?><br />
<strong>Favourite Quality in Women: </strong>
<?=get_the_author_meta( 'favouritequalityinwomen', $getId );?> <br />
<strong>My Favourite TV programs: </strong><br />
<?=get_the_author_meta( 'myfavouritetvprograms', $getId );?><br />
<strong>My Favourite Groups:</strong><br />
<?=get_the_author_meta( 'myfavouritegroups', $getId );?><br />
<strong>My Favourite Links:</strong><br />
<?=get_the_author_meta( 'myfavouritelinks', $getId );?>
</div>
<div class="alignRight">
<div class="left"><i>About Me:</i>
<p> <?=the_author_meta( 'description', $getId); ?></p>
</div>
<div class="right">
<?php if(get_the_author_meta( 'userphoto_thumb_file', $getId )!=""){?>
<img src="<?=$uploads['baseurl'];?>/thumbs/<?=get_the_author_meta( 'userphoto_thumb_file', $getId );?>" />
<?php }?>
<a href="#" class="allpic">see all pictures</a>
</div>
<div class="clr"></div>
<div class="contact"><strong>Contact information:</strong> [email protected]</div>
</div>
<div class="clr"></div>
</div>
</div>
</div>
<?php if ( is_active_sidebar('inner')): ?>
<div id="wrapper3rd">
<div id="innerSidebarContent">
<?php dynamic_sidebar( 'inner' ); ?>
</div>
</div>
<?php endif; // end sidebar widget area ?>
<?php get_footer(); ?>
A visitor that enters the correct code will see this profile
Can anyone tell me how I can add the same author_meta in profile_view as custom fields to all profile pages so they can be adjusted from the Dashboard under user profiles?
]]>function my_author_box() {
$author_name = the_author();
$site_link = the_author_meta('user_url');
$author_desc = the_author_meta('description');
$facebook_link = the_author_meta('aim');
$twitter_link = the_author_meta('yim');
$author_img_link = the_author_meta('jabber');
$return_text = '<div id="author-info"><div id="author-image"><a href="'.$site_link.'"><img src="'.$author_img_link.'" alt="'.$author_name.'" title="'.$author_name.'"/></a></div>
<div id="author-bio"><h4>Written by '.$author_name.'</h4><p>'.$author_desc.'</p></div></div>';
return $return_text;
}
add_shortcode('authorbox', 'my_author_box');
?>
*note – I’m using the jabber, aim, and yahoo im fields to store twitter, facebook, and a link to an image. They are all in “https://www.sitelink.com” format.
Few problems:
1. I get the basic meta info from listed at the very top of my posts, even though the [authorbox] code is placed at the very bottom. This will not display the CSS or image etc, just straight text with no spaces in between.
2. I ALSO get the author info at the bottom which is formatted according to my CSS. Several of the data items do not display, even though they appear correct at the top of the post.
Any ideas? Desperately trying to get this to work.
]]>