WordPress Edit Widgets Link

Simple to add “Edit Widgets” link for WordPress. Just add this to sidebar.php or similar.

<?php if (is_user_logged_in() ) {
	echo "<a href='../wp-admin/widgets.php'>Edit Widgets</a>";
} ?>

or if you want to use the WordPress Get Site URL

<?php if (is_user_logged_in() ) {
	echo '<a class="edit-widgets-link" href="' . get_site_url() . '/wp-admin/widgets.php">Edit Widgets</a>';
} ?>