This snippet checks if your WordPress post has a post thumbnail set and uses that as the default thumbnail for facebook sharing. If no post thumbnail is set it will use a default image that you have setup.
Set WordPress’s default attachment link to none
Anyone else get annoyed that WordPress automatically assumes you want to link an image to the full file when using the media uploader and Insert into Post button in the editor? This can be easily overidden by updating the option ‘image_default_link_type’ and setting it’s value to ‘none’. You can do this either with code in [...]
Add a Category Image Field to Jigoshop’s Product Categories
EDIT: After posting this I expanded quite a bit, adding more fields to the category meta & an upload button to the image fields. I don’t have time to add to the tutorial but the code can be grabbed from here. readme file details whats in there. Some of it you should be able to [...]
Get the WordPress post attachment ID from an Image Src
This function returns the wordpress attachment ID of a given image src. Useful if you need to get a different size version of the same image.
Better CSS Font Stacks
Taken from unitinteractive for easy reference. p – balanced for paragraphs or body copy t – balanced for headlines or titles Arial, “Helvetica Neue”, Helvetica, sans-serif – p, t Baskerville, “Times New Roman”, Times, serif – p Baskerville, Times, “Times New Roman”, serif – t Cambria, Georgia, Times, “Times New Roman”, serif – p, t [...]
Adding Menus in WP
Taken from wordpress codex. Copy / Paste code for adding menus to a theme.
Custom Posts & Taxonomies
Code for setting up custom post types including all labels and admin messages. Nothing exciting here :)
Hello world!
Welcome to pathorsley.com. This is my first post. WordPress wrote it for me!