Skip to main content

How to edit WordPress native Meta Widget?

With the WordPress native Meta Widget users can register and login into your website. Unfortunately the widget backend as no options to remove your website RSS link, your website comments RSS link and the WordPress link. For a login / register widget all those links are overkill and they extend a sidebar menu that is supposed to be short.

How to remove the links?

Really easy and can be accomplished in just a couple of minutes. There is only 1 file that needs to be edited, default.widgets.php located inside the wp-includes folder.

your_website_root/wp-includes/default-widgets.php

A word of advice:

Before starting any of the file editing. Make a backup copy of this file “just in case”.

What Needs to be edited:

techgasp_edit_meta_widget

Open the default-widget.php and search for meta until you find the above screenshot lines. Delete the second, third and forth <li> </li>lines.

The final code should look like:

<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>

Top right side of our website sidebar you can see the edited widget.

No Comments yet!