Jump to content
Sign in to follow this  
kellid

Why am I getting this Author Page parse error?

Recommended Posts

kellid

Hi again, Since it's not possible to add just ay template to PP. I'm trying to add an is_author clause to all is_author sections to have my author page show not only the posts but a bio/description and link to their website. I have this code that I've been trying to add to the section.postsinfo.php file but I keep getting this error: Parse error: syntax error, unexpected '}' in /home/modelall/public_html/wp-content/themes/platformpro/sections/wp/section.postsinfo.php on line 65 This is the code I've been trying to add: function section_template() { if(is_category() || is_archive() || is_search()): ?>

<?php if(is_search()):?> <?php _e("Search results for ", 'pagelines');?> "<?php the_search_query();?>" <?php elseif(is_category()):?> <?php _e("Currently viewing the category: ", 'pagelines');?> "<?php single_cat_title();?>" <?php elseif(is_tag()):?> <?php _e("Currently viewing the tag: ", 'pagelines');?> "<?php single_tag_title(''); ?>" <?php elseif(is_archive()):?> <?php if ( is_author() ) { echo 'Get info for this author'; } ?>

About: <?php echo $curauth->display_name; ?>

Website
<?php echo $curauth->user_url; ?>
Profile
<?php echo $curauth->user_description; ?>

Posts by <?php echo $curauth->nickname; ?>:

<?php endif; ?>
  • <?php } elseif (is_day()) { ?> <?php _e('From the daily archives:', 'pagelines'); ?>
<?php the_time('l, F j, Y'); ?> <?php } elseif (is_month()) { ?> <?php _e('From the monthly archives:', 'pagelines'); ?> <?php the_time('F Y'); ?> <?php } elseif (is_year()) { ?> <?php _e('From the yearly archives:', 'pagelines'); ?> <?php the_time('Y'); ?> <?php } else {?> <?php _e("Viewing archives for ", 'pagelines');?> "<?php the_date();?>" <?php } ?> <?php endif;?>
<?php endif; } } /* End of section class */ I added the section from if (is_author) to
  • . Line 65 is the following line after my code but I don't see what the problem is with it. Can anyone help me please? Thanks a lot.

Share this post


Link to post
Share on other sites
Simon
post your code in pastie or pastebin, its impossible to decode otherwise

Share this post


Link to post
Share on other sites
kellid
i'm sorry, obviously never used this before. http://pastebin.com/umdjCNYk

Share this post


Link to post
Share on other sites
kellid
Simon, I Love your Author page. I wanted exactly that but with a bio underneath of the author's name.

Share this post


Link to post
Share on other sites
Jenny
Have you checked out this page: http://codex.wordpress.org/Author_Templates ?

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
kellid
I did. I created one, uploaded and was told by one of the moderators that it wouldn't work with the PP system?! So they advised me to to the is_author clause.

Share this post


Link to post
Share on other sites
kellid
here is the updated pastebin url... http://pastebin.com/3WfGXHg0 Parse error: syntax error, unexpected '}' in /home/modelall/public_html/wp-content/themes/platformpro/sections/wp/section.postsinfo.php on line 65

Share this post


Link to post
Share on other sites
kellid
I did. That line isn't even a line I edited. It was already there. When I try to remove, I get another error. still working on it. Thanks catrina.

Share this post


Link to post
Share on other sites
Simon
http://pastie.org/2553739 <- working author archives page, enjoy!

Share this post


Link to post
Share on other sites
kellid
you are exceptional Pross. I am so greatly appreciative :))

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×