Category Description HTML
-
I am trying to get html to work in my category description. I have created a child theme to Twenty Twelve.
So far I have tried just about every code combination I could find to disable the WordPress html filters for the category description.
Following are 3 examples I placed this into my functions.php and WordPress still strips out all <p> <p />.
‘$filters = array(‘term_description’ , ‘category_description’ , ‘pre_term_description’);
foreach ( $filters as $filter ) {
remove_filter($filter, ‘wptexturize’);
remove_filter($filter, ‘convert_chars’);
remove_filter($filter, ‘wpautop’);
remove_filter($filter, ‘wp_filter_kses’);
remove_filter($filter, ‘strip_tags’);
}’I tried this also…
‘$filters = array(‘pre_term_description’, ‘pre_link_description’, ‘pre_link_notes’, ‘pre_user_description’);
foreach ( $filters as $filter ) {
remove_filter($filter, ‘wp_filter_kses’);
}’And this…
‘$filters = array(‘pre_term_description’,
‘pre_link_description’,
‘pre_link_notes’,
‘pre_user_description’
);
foreach ( $filters as $filter ) {
remove_filter($filter, ‘wp_filter_kses’);
}
remove_filter(‘term_description’, ‘wp_kses_data’);’I know it’s possible but I’ve run out of things to try – any ideas????
Here is one of my category test pages with a description at the top of the page.
- The topic ‘Category Description HTML’ is closed to new replies.