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 » Montezuma Theme »

Need help with Author Bio Coding


  #1  
Old Mar 29, 2013, 07:26 PM
munchy_cool
 
14 posts · Mar 2013
So I want to add author bio to end of each post, modifying single.php

below is the code snippet

<div class="post-bodycopy cf">
<?php the_content(); ?>
<!-- patch for author bio munchy_cool -->

<!-- <?php echo get_avatar( get_the_author_meta('email') , '80' , ' ' ); ?> -->
Written by <?php the_author_link(); ?>
<p><?php the_author_meta('description'); ?></p>
<p><a href="http://facebook.com/<?php the_author_meta('facebook_profile'); ?>" target="_blank"><img src="mysite.com/image.png" width="16" height="16" alt="Facebook" /></a>
<a href="http://twitter.com/<?php the_author_meta('twitter_profile'); ?>" target="_blank"><img src="mysite.com/image2.png" width="16" height="16" alt="Twitter" /></a><br /></p>
<!-- end of patch -->

Problem 1
<!-- <?php echo get_avatar( get_the_author_meta('email') , '80' , ' ' ); ?> -->

is not working , display a '80 on the page

Problem 2
the facebook and twitter images do not appear is 16,16 even though that's what I set them to above, any help would be appreciated.

Thanks
  #2  
Old Mar 29, 2013, 07:37 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
1) get_avatar is not in the limited php code allowed in the virtual templates
2) if you are on version 1.1.3, do you have patch 113-06 applied?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 29, 2013, 08:30 PM
munchy_cool
 
14 posts · Mar 2013
yes sir, the patch is applied ..

anything on the second problem?
  #4  
Old Mar 30, 2013, 03:29 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What is the URL?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Mar 30, 2013, 07:25 AM
munchy_cool
 
14 posts · Mar 2013
the website is a news website so I have not yet pushed the changes online, I am testing on my local wordpress installation, I can attach a screenshot if needed of my local test page
  #6  
Old Mar 30, 2013, 10:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what plugin are you using to put the fac ebook and twitter info in the author meta?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Mar 30, 2013, 10:36 AM
munchy_cool
 
14 posts · Mar 2013
I am not using any plugin, i added below code to functions.php

/*================================================= ==================================
* Add Author Links
* ================================================== ===============================*/
function add_to_author_profile( $contactmethods ) {
$contactmethods['rss_url'] = 'RSS URL';
$contactmethods['google_profile'] = 'Google Profile URL';
$contactmethods['twitter_profile'] = 'Twitter Profile URL';
$contactmethods['facebook_profile'] = 'Facebook Profile URL';
$contactmethods['linkedin_profile'] = 'Linkedin Profile URL';
return $contactmethods;
}
add_filter( 'user_contactmethods', 'add_to_author_profile', 10, 1);

function hide_profile_fields( $contactmethods ) {
unset($contactmethods['aim']);
unset($contactmethods['jabber']);
unset($contactmethods['yim']);
return $contactmethods;
}
add_filter('user_contactmethods','hide_profile_fie lds',10,1);

also I have made some progress with the images, instead of using 32x32 images I am using 16x16 images for the facebook and twitter links but now the problem is that the author bio is in a box and the facebook and twitter images are also inside a box but they kinda go out of the original box, author gravatar is still not working though.

here is the code in single.php
<div class="post-bodycopy cf">
<?php the_content(); ?>
<!-- patch for author bio -->
<div class="postauthor">
<!-- <?php echo get_avatar( get_the_author_meta('email') , '80' , ' ' ); ?> -->
<p class="hlight"> Written by <?php the_author_link(); ?> </p>
<p><?php the_author_meta('description'); ?></p>
<a href="http://facebook.com/<?php the_author_meta('facebook_profile'); ?>" target="_blank"><img src="facebook-pencil.png" alt="Facebook" class = "rsslink" /></a>
<a href="http://twitter.com/<?php the_author_meta('twitter_profile'); ?>" target="_blank"><img src="\twitter-pencil.png" alt="Twitter" /></a><br />
</div>

<!-- end of patch -->
<?php wp_link_pages( array(
'before' => __( '<p class="post-pagination">Pages:', 'montezuma' ),
'after' => '</p>'
) ); ?>

here is the css i added in posts.css
.postauthor {border-left: 1px solid silver;border-top: 1px solid silver;border-right: 1px solid silver; border-bottom: 1px solid silver; margin-top: 5px; margin-bottom: 10px; padding-left: 15px; padding-bottom: 5px; padding-right: 15px; padding-top: 5px; background-color: transparent; background: url(images/body-bg17.png); width: 525px; margin-top:5px;}
.postauthor img {float: left;}
.postauthor h4 {color: #666; font-size: 1.5em; margin-bottom: 5px;}
.postauthor p {color: #515151; font-size: 13px; margin-bottom: 7px; border:none, outline: none;}
.postauthor p.hlight {font-size: 11px; text-transform: uppercase;}

here is how it looks - http://imgur.com/sIlXARF

Notice the facebook and twitter icons have a border which is not inside the box, I tried removing the border by adding below line to css above
.postauthor a {border:none;}

but no go.
Also any help with gravatar would be awesome and we may have a working author bio for the theme.
  #8  
Old Mar 30, 2013, 01:50 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
as I said, the get_avatar() is NOT part of the Limiteed PHP coe allowed in the virtual templete.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Mar 30, 2013, 01:52 PM
munchy_cool
 
14 posts · Mar 2013
anywhere else we can put that, and any help on the icons going out of the box?
  #10  
Old Mar 30, 2013, 05:11 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
anywhere else we can put that
There was a post about adding new functions to the 'Limited PHP Code' that you could follow. I do not have the link to it so you will have to search the forum for it.
Quote:
any help on the icons going out of the box?
I would use the FireBug Extension of FireFos and play wiith the positioning of the icons.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
New in here and new to coding. AwesomeDude Atahualpa 3 Wordpress theme 6 Oct 22, 2011 04:51 PM
[SOLVED] How to Add Author Description to Page generated by &quot;%author-posts-link%&quot; Steve41 Post-Kicker, -Byline & -Footer 3 Dec 15, 2010 03:46 PM
Styling %author% and %author-posts-link% Aris Post-Kicker, -Byline & -Footer 2 Jul 6, 2010 10:34 PM


All times are GMT -6. The time now is 12:23 AM.


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