How to add code in PHP file… function.php
-
I want to add this(below) custom code to my function.php file and i don’t know how to add this whether i add this code as it is or add php tag after or before it…like (<?php(—code—-)?>)
// stop wp removing div tags function ikreativ_tinymce_fix( $init ) { // html elements being stripped $init['extended_valid_elements'] = 'div[*],article[*]'; // don't remove line breaks $init['remove_linebreaks'] = false; // convert newline characters to BR $init['convert_newlines_to_brs'] = true; // don't remove redundant BR $init['remove_redundant_brs'] = false; // pass back to wordpress return $init; } add_filter('tiny_mce_before_init', 'ikreativ_tinymce_fix');
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘How to add code in PHP file… function.php’ is closed to new replies.