Let’s Create a Basic WordPress Widget – Part 1



In this part we create our comment head and start blocking out our custom class.

What’s this series about?

This series will walk you through creating a basic WordPress widget from scratch. The widget will loop through and grab posts based on view count. View count functionality was added to our theme in Part 20 of the WordPress Theme Tutorial series. If you just want the functionality, you can download a plugin that I put together that uses the same method.

AwfulMedia’s channel publishes web development video tutorials on HTML, CSS, WordPress, and more. Be sure to subscribe to AwfulMedia for more goodies!

View Count functionality tutorial:

Download the AM Post Views Plugin:
awfulmedia.com/downloads/plugins/am-post-views.rar

WordPress Codex:
http://codex.wordpress.org/Widgets_API

Good resources for understanding PHP Classes:

PHP Manual:
http://php.net/manual/en/keyword.class.php

Stackoverflow:
http://stackoverflow.com/questions/2206387/what-is-a-class-in-php

Edrackham:
http://edrackham.com/php/php-class-tutorial/

Twitter:

Facebook:
http://www.facebook.com/AwfulMedia

Website:
http://www.awfulmedia.com/

source

Reply


Build A Site Info