wordpress snippets last updated   : October 6, 2014
we now have 641 snippets
category admin

Exclude pages from admin edit pages list

wordpress snippet

This is a great little snippet that will exclude pages based on the the ID from the admin pages list. Just add this snippet to the functions.php of your wordpress theme and update the array with the page ID’s you wish to hide. Please note this does not stop a post from being editable this snippet only hides the page from view.

read more

Display $hook_suffix as admin notice

wordpress snippet

When developing in wordpress you may have a need for the hook_suffix that can later be used to register a hook called on a particular page load-hook_suffix. Just add this wordpress snippet to the functions.php of your wordpress theme and enable and disable as needed when working on a project.

read more

Remove buttons from add media popup

wordpress snippet

Run into this snippet not to long ago that will let you remove every button from add media popup. This will remove all but the delete button from the media popup so have fun and enjoy.

read more

Redirect admin pages to any location

wordpress snippet

Redirecting the admin pages was something I needed to do for a recent project. The following snippet will let you redirect any of the admin pages to any location you wish based on the user ‘capability’. Another option would be to replace wp_redirect with wp_die(“some custom message”); to display a message instead of redirecting.

read more

Use gettext, ngetext to replace array of words in wp admin

wordpress snippet

Simple but useful method using gettext, ngetext filter to replace an entire array of words within the wordpress admin. Just update the array key with the item you wish to replace and the array value with the text to replace it with. Add this snippet to the functions.php of your wordpress theme.

read more

Hide post view and post preview admin buttons

wordpress snippet

Ever wanted to remove “preview & view” options from the new post and post edit admin screens. Add this snippet to the functions.php of your wordpress theme and don’t forget to update the post type array. Enter any post type you would like to remove the “view and preview” buttons from “custom post type, post, page”.

read more
jqsnipp.com | we just launched jquery snippets website