Add to post_class();


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // add classes to post_class();
  2. // add more name to $classes[] = 'your-class-name';
  3. add_filter('post_class', 'sfn_add_post_class');
  4.  
  5. function sfn_add_post_class( $classes ) {
  6. $classes[] = 'your-class-name';
  7.  
  8. return $classes;
  9. } // end sfn_add_post_class

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.