• 0

How to create a WordPress widget?


Question

I have a WordPress blog, and a IP.Board (Invision Power Board) forum. I want to display the 5 most recent forum posts in a widget on the front page (kind of like how Neowin does).

In the database, there is a table called "Topics" (which lists the forum posts). So, the SQL statement would presumably look something like:

SELECT tid,title FROM topics ORDER BY tid DESC LIMIT 5

So that seems to be the easy part. What I need help with is: how do I actually create the widget? I have experience with PHP and working with MySQL databases, but I've never created a custom widget before. Do I just create code that echos the last 5 posts, then put the PHP file in the plug-ins directory?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.