WordPress 3.6 を使用。
メタ情報ウィジェットの「投稿の RSS」「コメントの RSS」「WordPress.org」あたりはいらないので消したい。
そういう場合は wp-includes/default-widgets.php を修正する。自己責任でどうぞ。
default-widgets.php
PHP
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | class WP_Widget_Meta extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") ); parent::__construct('meta', __('Meta'), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title'], $instance, $this->id_base); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; ?> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>"><?php /* translators: meta widget link text */ _e( 'WordPress.org' ); ?></a></li> <?php wp_meta(); ?> </ul> |
該当箇所をコメントアウトまたは削除する。
でもこれだと WordPress のバージョンアップ時は消されちゃうからその都度修正が必要になる。あらかじめ修正済みの状態になっているような簡単なウィジェットでも自作してそれを使ってたほうが色々と都合がいいと思う。
- クリックして X で共有 (新しいウィンドウで開きます) X
- クリックして Bluesky で共有 (新しいウィンドウで開きます) Bluesky
- Facebook で共有するにはクリックしてください (新しいウィンドウで開きます) Facebook
- クリックして Bookmark で共有 (新しいウィンドウで開きます) Bookmark
- クリックして Pocket でシェア (新しいウィンドウで開きます) Pocket
- クリックして LINE で共有 (新しいウィンドウで開きます) LINE
- その他
- クリックして友達にメールでリンクを送信 (新しいウィンドウで開きます) メールアドレス
- クリックして印刷 (新しいウィンドウで開きます) 印刷
- クリックして Mastodon で共有 (新しいウィンドウで開きます) Mastodon
- クリックして Nextdoor で共有 (新しいウィンドウで開きます) Nextdoor
- クリックして Pinterest で共有 (新しいウィンドウで開きます) Pinterest
- クリックして Tumblr で共有 (新しいウィンドウで開きます) Tumblr
- クリックして Reddit で共有 (新しいウィンドウで開きます) Reddit
- クリックして LinkedIn で共有 (新しいウィンドウで開きます) LinkedIn
- クリックして Telegram で共有 (新しいウィンドウで開きます) Telegram
- クリックして WhatsApp で共有 (新しいウィンドウで開きます) WhatsApp