How to disable "written by... " in posts ?

WordPress theme dedicated to start-up websites with amazing CSS3 animated icons, price tables and parallax effect background.
GK User
Wed Jun 19, 2013 4:25 pm
I would like to disable date and "written by author" in posts. Need help, thanks.
User avatar
Fresh Boarder

GK User
Wed Jun 19, 2013 4:44 pm
Both date and author should be found in single.php in themes folder but not in simplicity template... :(
User avatar
Fresh Boarder

GK User
Wed Jun 19, 2013 10:08 pm
Hi,

Go to Simplicity/gavern/helpers/helpers.layout.fragments.php file and find gk_post_meta function (around line 198), then replace
Code: Select all
<li>
             <time class="entry-date" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                <?php echo esc_html(get_the_date('F j, Y')); ?>
             </time>
          </li>
          
          <?php if(!(is_tag() || is_search())) : ?>
             <li>
                <?php _e('Written by ', GKTPLNAME); ?>
                <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>
             </li>
with this one
Code: Select all
<?php if(!(is_single())): ?>
          <li>
             <time class="entry-date" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                <?php echo esc_html(get_the_date('F j, Y')); ?>
             </time>
          </li>
          <?php endif; ?>
         
          <?php if(!(is_tag() || is_search())) : ?>
            <?php if(!(is_single())): ?>
             <li>
                <?php _e('Written by ', GKTPLNAME); ?>
                <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>
             </li>
             <?php endif; ?>

BTW in the nearest Theme update, there will be option to disable/enable these elements..
User avatar
Moderator

GK User
Thu Jun 20, 2013 8:59 am
Thanks !! Working perfect :)
User avatar
Fresh Boarder


cron