Skip to content

Instantly share code, notes, and snippets.

@macariojames
Created April 19, 2018 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macariojames/d23e1a51100cd3882c89024a513b90db to your computer and use it in GitHub Desktop.
Save macariojames/d23e1a51100cd3882c89024a513b90db to your computer and use it in GitHub Desktop.
Hide Upcoming Events from the WordPress Events and News Dashboard Widget
// Hide Upcoming Events from Dashboard Widget
// Basically just CSS; a display: none and then some personal choice
// formatting for the news items ~mj
function hide_wp_upcoming_events() {
?>
<style>
#community-events {
display: none;
}
.wordpress-news {
padding: 10px 0;
}
.wordpress-news .rss-widget ul li {
border-bottom: 1px #eee solid;
}
</style>
<?php
}
add_action('admin_head', 'hide_wp_upcoming_events');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment