wordpress snippets last updated   : April 14, 2014
we now have 630 snippets

Insert calendar into wp_nav_menu

wordpress snippet

Needed this for a recent project as a client wanted to display the wordpress calendar as a dropdown item within the menu. Add this snippet to the functions.php of your wordpress theme will add a new menu item to your wp_nav_menu that has a submenu calendar.

read more

Change title attribute of wordpress login logo

wordpress snippet

This little snippet will change the title attribute text when you hover over the wordpress logo on the login page. If you want to replace the logo take a look at this snippet it will remove the wordpress logo.

read more

Post Meta.. How do I save it? (add_post_meta)

tutorials
post-meta-save-how-to

Next up in our post meta walk-through is the add_post_meta function. In the last post, we talked about wanting to save the following data to our post:

read more

Post Meta.. How do I save it?

tutorials
post-meta-save-how-to

In the last article,we talked about post meta from a high-level, explaining what it is, and how it’s presented in WordPress, and most importantly, how to use get_post_meta to retrieve that data.

read more

Add custom image sizes to media insert dialog box with image_size_names_choose

wordpress snippet

With this little snippet you can add custom image sizes to media insert dialog box. image_size_names_choose allows modification of the image size lists so that you can place a custom option within the media library.

read more

What is Post Meta? An intro to WordPress Custom Fields

tutorials
post-meta-intro-wordpress-custom-fields

Here on wpsnipp, we post a lot of snippets revolving around post meta. You’ve undoubtably seen snippets with function calls like get_post_meta( $post_id, $meta_key, true ) or update_post_meta( $post_id, $meta_key, $new_value ), but you may not understand what WordPress is actually doing.

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