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

Display full post or just excerpt using custom fields

wordpress snippet

Adding this snippet to the loop of your wordpress theme within single.php or index.php will let you use a custom field value to define if a post is displayed in full or just the excerpt.

read more

Restricting authors to view only posts they created

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will restrict authors to view only posts they created within the admin panel.

read more

Replace menu text within the admin sidebar menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will replace the word “post” in the admin menu with the word “article”. This snippet however could be used to replace other items within the admin sidebar menu.

read more

Display published posts between two dates

wordpress snippet

Adding this snippet to your wordpress theme will enable you to display published posts between two dates. You could place this great little snippet within your sidebar or create a custom template to display last years posts.

read more

Change custom post type icon for new and edit post pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will change the default icon on the post edit and new post pages. Don’t forget to change the URL on line 9 to the location of your 24px by 24px icon.

read more

Change the custom post type icon for admin menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will create a custom post type products. On line 10 of this snippet we have menu_icon change the URL to the location of your 16px by 16px icon to display in the admin menu.

read more