Jump to content
Sign in to follow this  

Adding an exception for author page

Recommended Posts


Hello, I've had some help from one of your excellent moderators and they led me in the right direction. I've been trying to make an Author page that shows a description about the author and link the their website and they informed me that I could add an exception of is_author to all is_archive in php files and I wanted to know if I'm doing this correctly. This is the code I have for the section.postsinfo.php file... 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(array(3,4,9,10,11,12,13,14,))) { echo 'this is either author 3,4,9,10,11,12,13, or 14'; } ?>

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

<?php echo $curauth->user_url; ?>
<?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 */ Can someone tell me if I'm editing this correctly and if so, would I need to do this for every instance I see "is_archive" which would be in all of the following files: template.loader.php section.postsinfo.php class.template.php library.functions.php ms.blogs.php post.template.php general.template.php query.php bbp-core-compatiblility.php :-/ Thanks for the help :)

Share this post

Link to post
Share on other sites
I don't believe it is necessary for you to change the instance in bbp-core-compatiblility.php

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

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