Changes to iNove theme

Show editor name, date and time of edit in single posts

In single.php after

1
2
3
4
5
6
7
8
9
10
        <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>
        </div>

and before

1
2
3
4
        <div class="content">
            <?php the_content(); ?>
            <div class="fixed"></div>
        </div>

add

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
        <!-- added by Spike -->
        <?php if (get_the_modified_time() != get_the_time()): ?>
            <div class="info">
                <div class="edit-date">
                    <?php if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
                            $last_user = get_userdata($last_id);
                            printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
                        } else {
                            printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
                        } ?>
                </div>
                <div class="fixed"></div>
            </div>
        <?php endif; ?>
        <!-- end added by Spike -->

At the end of style.css add

1
2
3
4
5
6
7
8
9
10
11
12
/* added by Spike */

.post .edit-date {
    background:url(img/calendar.png) no-repeat;
    padding-left:22px;
    height:16px;
    line-height:16px;
    display:block;
    font-size:11px;
}

/* end added by Spike */

 

If you want the same in the frontpage, edit index.php and put the code exactly in the same place.

 

Remove borders in tables

In style.css, at line 504, comment out

1
2
border:2px solid #CCC;
border-collapse:collapse;

and at line 510 comment out

1
border:1px solid #CCC;

 

Increase space between article information and article content

In style.css, at line 469, change

1
padding:5px 0 0 5px;

to

1
padding:25px 0 0 5px;

Increase padding after h3 style

In style.css, at line 33, change

1
h3 {font-size:150%;}

to

1
2
3
4
h3 {
    font-size:150%;
    padding-bottom: 5px; /* edit by Spike */
}

 

Add support for Custom Menus

In functions.php, at line 481, insert

1
2
3
4
5
6
7
8
// Custom Menu by Spike
add_theme_support( 'menus' );

// remove ul wp_nav_menu
function remove_ul ( $menu ){
    return preg_replace( array( '#^<ul[^>]*>#', '#</ul>$#' ), '', $menu );
}
add_filter( 'wp_nav_menu', 'remove_ul' );

In /templates/header.php, at line 34, comment out

1
wp_list_pages('title_li=0&sort_column=menu_order');

and after insert

1
wp_nav_menu(array( 'container' => '', 'container_class' => '', 'menu_id' => 'menus'));

SOURCES:
Wordpress Codex: wp_nav_menu
Wordpress Codex: add_theme_support
Wordpress support forum: update to support wp 3 menu

 

  1. 23 marzo 2011 a 11:16 | #1

    Hi thanks for your post, I have a problem with the tables. You see the border. I changed the lines 504 and 510 but are still watching. Could you send me the code style.ccs with this change?
    I would greatly appreciate it.

  2. 23 marzo 2011 a 11:30 | #2

    Hi David,
    I checked your style.css
    At your line #494 change

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    .post .content table {
        background:#FFF;
        border:2px solid #CCC;
        border-collapse:collapse;
        margin:5px 0 10px;
    }
    .post .content th,
    .post .content td {

        border-collapse:collapse;
       
        text-align:left;
        vertical-align:top;
    }
    .post .content tr.even td {
        border:1px solid #CCC;
       
       

    }

    to

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    .post .content table {
        background:#FFF;
        /* border:2px solid #CCC; edit by Spike */
        /* border-collapse:collapse; edit by Spike */
        margin:5px 0 10px;
    }
    .post .content th,
    .post .content td {
        /* border:1px solid #CCC; edit by Spike */
        padding:3px 10px;
        text-align:left;
        vertical-align:top;
    }
    .post .content tr.even td {
        background:#F7F7F7;
    }
  3. 15 agosto 2011 a 2:45 | #3

    Hello!
    Nice post!
    If somebody needs merely to get the iNove’s sidebar smaller, just read the following article – <a href=”http://dotnetfollower.com/wordpress/2010/12/get-the-smaller-sidebar-of-inove-theme/”>http://dotnetfollower.com/wordpress/2010/12/get-the-smaller-sidebar-of-inove-theme/</a&gt;
    Thanks!