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

Prepend ‘Sponsored post:’ to post title using post_meta

wordpress snippet

Simple little snippet that will use a custom field sponsored set to true will prepend “‘Sponsored post:” to the_title. The second snippet will prepend the value of sponsored to the_title.

read more

Attach PDF files to post with custom metabox file selection

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will create a new metabox within your post editing screen with a select menu listing all PDF files. Adding the second snippet in your wordpress template in the location you wish to display the files URL.

read more

Add custom field automatically when post or page is publish

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom field to a post or page when published. Don’t forget to update the FIELD_NAME and the CUSTOM VALUE.

read more

Remove support for specific post type features

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove support for the specific features bellow from specified post types. Change the word ‘post’ to anything you like including a custom post type name or the default post, page.

read more

Attach images with simple thumbnail selection metabox

wordpress snippet

A little snippet I wrote recently to easily attach images to posts with a simple thumbnail selection metabox. Add the first snippet to the functions.php of your wordress theme. Place the second snippet within the loop of your wordpress theme to display the images in your posts or pages.

read more

Display hidden custom field _values

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will allow you to display hidden custom field values. When a custom field value is prefixed within an underscore _value it will not be displayed, using this snippet will display them temporarily.

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