category

twitter

【WordPress】メタ情報の表示項目を編集する

Bookmark this on Google Bookmarks
このエントリーをはてなブックマークに追加
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Bookmark this on Delicious

WordPressのデフォルトのウィジェットにメタ情報つぅのがあるんです。
まぁ、管理画面へのリンクやら、RSSフィードやらが搭載されているのですが…

WordPress.org のリンクなんて誰が踏むねんっ!てことなんすよ。

メタ情報

メタ情報

んで、これを消すには
wp-includes/default-widgete.phpWP_Widget_Meta クラスを編集
その中にある関数 widget( $args, $instance ) が今回のターゲット

class WP_Widget_Meta extends WP_Widget {
	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="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
			<?php wp_meta(); ?>
			</ul>
<?php
		echo $after_widget;
	}
}

ハイライト行を削除 or コメントアウト

これで完了。

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">