WordPress 3.3.1 – Edit Meta Menu Widget

Okay, first thing I learnt while trying to set up this new website is how to edit the Meta Menu Widget in WordPress 3.3.1

One ways is to just remove the widget from Appearances > Widgets. Being that I didn’t feel like copying the links I actually wanted into a new widget I went in search of the php code that was behind the widget. I saw online references to widgets.php in the wp-includes folder but in 3.3.1 this does not contain the actual code for the Meta Widget. The php code for that widget is now located in default-widgets.php also found in the wp-includes folder. Search for the following to find the correct class:

class WP_Widget_Meta extends WP_Widget {

just below that on line 286 in default-widget.php is the function that builds the widget:

function widget( $args, $instance ) {

removing the <li>…</li> entries will remove the menu item, for example removing this line:

<li><?php wp_loginout(); ?></li>

will remove the Log out and Log in links.

One thought on “WordPress 3.3.1 – Edit Meta Menu Widget

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">