add_filter ONLY for is_single
-
I’ve written a plugin to add a dropcap to the first letter of all my posts. At present it applies to pages as well as posts, I only want it to display on Posts.
i tried this
if (is_single()) {
add_filter(‘the_content’, ‘drop_cap’);
}in the plugin, but obviously that doesn’t work. is there a way to do this that i’m just not seeing? thanks for any help!!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘add_filter ONLY for is_single’ is closed to new replies.