页面载入中...

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; ?>

0条留言. 发言 or Trackback

留言 ↓

欢迎回来, (修改)

  • :em19:
  • :em01:
  • :em25:
  • :em09:
  • :em11:
  • :em00:
  • :em13:
  • :em08:
  • :em10:
  • :em03:
  • :em02:
  • :em05:
  • :em07:
  • :em16:
  • :em27:
  • :em14:
  • :em21:
  • :em20:
  • :em24:
  • :em18:
  • :em17:
  • :em06:
  • :em23:
  • :em12:
  • :em22:
  • :em15:
  • :em26:
  • :em04:

正在提交数据...