Home > iNove > iNove theme: show “Last edited by” in posts

iNove theme: show “Last edited by” in posts

Last edited by on 13 December 2013 at 13:05

If you want the change in single posts, edit single.php, if you want the change in Home Page, edit index.php.


In single.php after

[cce_php]        <div class="info">
            <span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
            <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
            <?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?>
            <?php if ($comments || comments_open()) : ?>
                <span class="addcomment"><a href="#respond"><?php _e('Leave a comment', 'inove'); ?></a></span>
                <span class="comments"><a href="#comments"><?php _e('Go to comments', 'inove'); ?></a></span>
            <?php endif; ?>
            <div class="fixed"></div>

and before

[cce_php]        <div class="content">
            <?php the_content(); ?>
            <div class="fixed"></div>


[cce_php]        <!-- added by Spike -->
        <?php if (get_the_modified_time() != get_the_time()): ?>
            <div class="info">
                <div class="edit-date">
                    <?php printf('Last edited by <a href="%1$s" title="%2$s" rel="author">%3$s</a> on %4$s at %5$s',
                        esc_url( get_author_posts_url( get_the_author_meta( 'ID', get_post_meta($post->ID, '_edit_last', true) ) ) ),
                        esc_attr( sprintf( __( 'View all posts by %s', 'inove' ), get_the_modified_author() ) ),
                        get_the_modified_time('j F Y'),
                <div class="fixed"></div>
        <?php endif; ?>
        <!-- end added by Spike -->[/cce]


In index.php after

[cce_php]        <div>
            <span><?php the_time(__('j F Y', 'inove')) ?></span>
            <?php if ($options['author']) : ?><span><?php the_author_posts_link(); ?></span><?php endif; ?>
            <?php edit_post_link(__('Edit', 'inove'), '<span>', '</span>'); ?>
            <span><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span>

add exactly the same piece of code.

For both, at the end of style.css add

[cce_css]/* added by Spike */

.post .edit-date {
    background:url(img/calendar.png) no-repeat;

/* end added by Spike */[/cce]


Categories: Wordpress, iNove
  1. No comments yet.
  1. No trackbacks yet.