Today let’s learn a simple quick trick on how to create a custom widget. For my example I will show you how I created my Showcase widget located in the middle, to the right of the posts.
First under your functions.php
file type in the following:
<?php // Custom Widget function MyCustomWidget() { ?> <li class="widget"> <h2 class="heading">Latest Showcase</h2> <ul> <?php include(TEMPLATEPATH . '/includes/showcase.php'); ?> </ul> </li> <?php } register_sidebar_widget('The Custom Widget for Showcase', 'MyCustomWidget'); ?>
<?php
and ?>
for it to work.<li<
because my sidebar’s start and end with <ul<
.register_sidebar_widget('the widget title', 'the name of the function');
“That’s it! Now you have a custom widget with what ever you want!
I am at the WordCamp convention in Las Vegas and
This post discusses the importance of detecting and removing plagiarized content for credibility, originality, avoiding…
I talked about Disabling search engine on search pages in a previous post using the…
The time is near, only 6 hours and some change to to get your tickets…
A good idea when trying to get the most out of your blog is usging…