wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Remove the_post_thumbnail class

wordpress snippet

Have you ever been using the_post_thumbnail( 'thumbnail' ); but wanted to remove the class that is automatically added. Add the following snippet to the functions.php of your wordpress theme to automatically remove any class. Simple but effective,

read more

Add class to first post in the loop

wordpress snippet

If you wanted to add emphasis to the first post in your blog adding this snippet to the functions.php of your wordpress theme will add the class of “first” to your first post.

read more

Add a custom class to the_tags

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom class to links output by the_tags template tag.

read more

Add a custom class to wp_get_attachment_link

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom class to wp_get_attachment_link.

read more

Add post class to posts with read more link

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a post class to posts that contain a read more link.

read more

Remove every class and id from the wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove nearly every class and id from the wp_nav_menu except for the current-menu-item class. This is a great little snippet that will make your wp_nav_menu a little cleaner enjoy.

read more