"Display Author" not behaving as expected in search pages

Get help or discuss with other members about business Joomla! 3 and 2.5 template designed especially for your start-up projects on dedicated support forum.
GK User
Thu Dec 13, 2012 11:58 am
Hi,

The Basic theme setting "Display Author Info" is not behaving totally as expected, as it still appears in the template for the search results in the
Code: Select all
<aside class="meta">
HTML section.

I could only fix/hack this with CSS override.

Regards,
Thomas.
User avatar
Fresh Boarder

GK User
Thu Dec 13, 2012 12:42 pm
Hi,

The "Display Author info" option is connected with the Author block container under the item content. If you want to hide the author name on the search pages I suggest to modify the gk_post_meta function in the helpers.layout.fragments.php file and use the is_search() conditional tag.
User avatar
Administrator

GK User
Thu Dec 13, 2012 2:32 pm
Thanks for the quick reply. I managed to fix the code. Here it is if someone else needs it.
So for those would not like the author information to appear anywhere in the site, you might need to edit the helpers.layout.fragments.php file on line 236 to this :
Code: Select all
         <?php if(get_option($tpl->name . '_template_show_author_info') == 'Y'): ?>
          <dt class="author">
             <?php _e('Author:', GKTPLNAME); ?>
          </dt>
          <dd>
             <a class="url fn n" href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" title="<?php echo esc_attr(sprintf(__('View all posts by %s', GKTPLNAME), get_the_author())); ?>" rel="author"><?php echo get_the_author(); ?></a>
          </dd>
         <?php endif; ?>
User avatar
Fresh Boarder


cron