Skip to content

Tag: Wordpress

How to allow more html tags in the wordpress comments?

Scenario: I am using the tinymcecomments plugin to give some formatting capabilities to commenters. Also oEmbed for Comments is nice one – when you put a link to youtube or vimeo it automatically embeds the video.
With the latest WP update I realised the span tag was removed from comments; colors attributes are filtered by the kses filter.

Function to get wordpress theme URL

This function will return the theme directory URL so you can use it in other functions:


Alternatively, this function will echo the theme directory URL to the browser:


So an example for an image in the themes images/headers folder would be:

<img src="<?php bloginfo('template_directory'); ?>/images/headers/image.jpg" />