Loading...

WordPress中加快显示dashboard

  1. 去掉wordpress news, 打开index.php, 删掉6-13行

    <script type=”text/javascript”>
    Event.observe( window, ‘load’, dashboard_init, false );
    function dashboard_init() {
    var update1 = new Ajax.Updater( ‘incominglinks’, ‘index-extra.php?jax=incominglinks’ );
    var update2 = new Ajax.Updater( ‘devnews’, ‘index-extra.php?jax=devnews’ );
    var update3 = new Ajax.Updater( ‘planetnews’, ‘index-extra.php?jax=planetnews’ );
    }

    </script>

  2. 删除最近已发布的文章列表, 62-79行

    <?php
    if ( $recentposts = $wpdb->get_results(”SELECT ID, post_title FROM $wpdb->posts WHERE post_type = ‘post’ AND post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 5″) ) :
    ?>
    <div>
    <h3><?php _e(’Posts’); ?> <a href=”edit.php” title=”<?php _e(’More posts…’); ?>”>»</a></h3>
    <ul>
    <?php
    foreach ($recentposts as $post) {
    if ($post->post_title == ”)
    $post->post_title = sprintf(__(’Post #%s’), $post->ID);
    echo “<li><a href=’post.php?action=edit&post=$post->ID’>”;
    the_title();
    echo ‘</a></li>’;
    }
    ?>
    </ul>
    </div>
    <?php endif; ?>

0Comment(s). Blabla or Trackback

Blabla ↓

Connecting to server...