Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

escape class wordpress

/* If you want to explicitly style a post, you can use the sanitized 
 * version of the post title as a class
 */
$post_class = sanitize_html_class( $post->post_title );
echo '<div class="' . $post_class . '">';
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #escape #class #wordpress
ADD COMMENT
Topic
Name
5+1 =