WP Snipp

    Remove featured image when deleting post with wp_delete_attachment
    From: wpsnipp.com By: Kevin ChardIn a recent project I needed to create posts and upload images from the front end as featured image. So as a result I also needed to remove these attachments when people deleted the posts. Otherwise we would have a lot of orphan images using up lots of precious space in our WordPress Media Library. Adding this snippet to the […]

    Capture users last login date and time
    From: wpsnipp.com By: Kevin ChardAdding the first snippet to the functions.php of your wordpress theme will capture a users last login date. Recently I updated the script for the most current version of WordPress. Things have been changed to wpsnipp_get_last_login() and wpsnipp_set_last_login() should be obvious what they do. One will update the last login d […]

    Track post views without a plugin using post meta
    From: wpsnipp.com By: Kevin ChardUse the following snippet to track post views on your wordpress blog. The first thing you want to do is add this snippet to the functions.php of your wordpress theme. Follow step 1. and step 2. to track and display the number of views for each post. Updated this snippet from my original post on March 3rd, 2011 to Included a o […]

    Auto Image Theme
    From: wpsnipp.com By: Kevin ChardA Unique Design for Car Dealer Website built with WordPress. If you run a car dealership or you wish to run using WooCommerce and sell automobile related products this theme is for you.link: Auto Image Theme “Auto Image Theme is a post from: wpsnipp.com - WordPress Snippets, Code, Hacks, 615+ for your wordpress theme or blog. […]

    Add custom attribute to image using the_post_thumbnail
    From: wpsnipp.com By: Kevin ChardSometimes you will need to add a custom attribute to an image. This is very easy to do using the_post_thumbnail() function. The following snippet will add the custom attribute of 'itemprop="image" to your images but you can change that to nearly anything including class, alt, title etc.link: Add custom attribut […]

    Masterstudy Theme
    From: wpsnipp.com By: Kevin ChardMasterStudy is the best WordPress theme for the Education & Learning Center – for educational organizations, who sell courses and organize classes locally. Using Masterstudy you can easily setup a stunnig WordPress site for your education business.link: Masterstudy Theme “Masterstudy Theme is a post from: wpsnipp.com - Wo […]

    Display theme information with wp_get_theme
    From: wpsnipp.com By: Kevin ChardAdding this snippet to your wordpress theme will let you display data from your theme file. name, title, uri, description, authorURI, template, version, status, tags, author. We have updated this snippet to coincide with the most recent changes to wordpress.link: Display theme information with wp_get_theme “Display theme info […]

    Enable Milestone Sales Alerts for Easy Digital Downloads
    From: wpsnipp.com By: Kevin ChardThis is a great snippet for Easy Digital Downloads that will enable milestone sales email alerts. You will first need to add the ID of the download you wish to be alerted about. You can then set the default milestone amount, currently the snippet is at 100. You can also set the notification email to an array of emails or leav […]

    Remove Easy Digital Downloads sales summary widget
    From: wpsnipp.com By: Kevin ChardNot everyone is a big fan of wordpress dashboard widgets and although I really like the Easy Digital Downloads sales summary widget, others may not. Pippin Williamson has provided and easy way for you to remove the EDD sales summary widget. Just add this single line of code to the functions.php of your wordpress theme or run […]

    Replace Easy Digital Downloads Menu Icon
    From: wpsnipp.com By: Kevin ChardIf you want to replace the standard menu icon in Easy Digital Downloads with an icon from Dashicons. Just add the following snippet to the functions.php of your wordpress theme. Don't forget to checkout the Dashicon options available.link: Replace Easy Digital Downloads Menu Icon “Replace Easy Digital Downloads Menu Icon […]