Anything I can add to functions.php to make text widgets accept PHP?

Is there a way I can make text widgets accept PHP? Perhaps something I can add in to functions.php? I’m redesigning my site, and I was wondering why I didn’t use widgets at all in my current design, but then I realized it was because I use a lot of PHP in there.

For example, one of the “widgets” is a tabbed content area, so I’ve got the HTML and JavaScript shell for the tabs, but then inside the tabs, I’ve got PHP calls for the most popular posts, the most recent posts, and the most recent comments. I can’t do that with existing widgets.

Read More

Obviously I could use a plugin, but I’m trying to go light on plugins where possible. Is there something I can just add to functions.php?

Related posts

Leave a Reply

1 comment