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,
Have you ever been usingRead More...
Want to show or hide widgets on specific pages? This is a great little snippet contributed by Joel Worsham that will do just that. You will first need to get the id name of the widget that you wish to define. You can do this be viewing the page source or using a web inspector tool to view the widget id. The current sample is setup to only display the core ‘pages’ widget on the contact page only. Don’t forget thatRead More...
is_pagealso accepts an array of page names and id’s.
Have you ever wanted to change the default options when inserting media into a post? Setting the default alignment to “left” or the default size to “large” ? This may not appear to be a big deal but if you are constantly changing the settings to the same thing over and over again for each image this is a must have snippet. We are updating the options “image_default_align, image_default_link_type, image_default_size”. Keep in mind that this just changes the default settings of these options within the add media popup. The method we use to update these options can be used for a number of other options including what you can find in this options reference.Read More...
This snippet will display absolutely all custom fields for each post. Even custom fields you may not even be aware exist likeRead More...
_edit_lockand others. We have Justin Sternberg to thank for writing this snippet that was submitted a while ago as part of his tutorial on wordpress custom fields. Since this snippet is not available other than in the tutorial I figure it should be posted separately.
I have needed to move a post column like “date, tags, author” or even a custom column within the wordpress admin. This is a simple method that I used to change the order of columns within the admin. What you have is two variables you will need to changeRead More...
$before. Move is the name of the column you would like to move. Before is the name of the column you would like to move it before. The following snippet will let you move the author column before the post title column.