Add custom field automatically when post or page is publish
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 moreShortcode to display users IP address in posts & pages
Adding this snippet to the functions.php of your wordpress theme will let you use a shortcode to display the users IP address in your posts or pages.
read morethis months featured snippets
Exclude pages from admin pages list by ID
Adding this snippet to the functions.php of your wordpress theme will let you remove pages from the admin pages list. Just update the list of page IDs within the array.
read moreReturn ID if parent page exists
This is a great little snippet that will let you return the ID of the parent page if the page has a parent. Just add this snippet to the functions.php of your wordpress theme and your ready to get the parent page ID.
read moreDisplay attachment thumbnail with image metadata
Adding this snippet within the loop of your index.php template file will display a list of all post attachments with the following metadata (Credit, Camera, Focal Length, Aperture, ISO, Shutter Speed, Time Stamp, Copyright).
read moreAdd post ID to posts, pages admin columns
Adding this snippet to the functions.php of your wordpress theme will add ID to post and pages admin columns.
read moreAttach images with simple thumbnail selection metabox
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 morelast months featured snippets
Disable content editor for specific page template
Adding this snippet to the functions.php of your wordpress theme will disable the content editor when a page is using a specific template. Don’t forget to change the name of the template file on line 08 this sample I have submit.php but can be changed to anything.
read more



















