Loading different comment.php pages depending on get_body_class()
-
I know what needs to be done, but I’m just checking on syntax, since that is my personal Kryptonite. Here’s my code for comments.php in my Child Theme:
<?php $classes = get_body_class(); if (in_array('specificClass',$classes)) { include( TEMPLATEPATH . '/comments-modified.php' ); } else { include( TEMPLATEPATH . '/comments-original.php' ); } ?>
Does this sound about right to all you WordPress Gurus out there?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Loading different comment.php pages depending on get_body_class()’ is closed to new replies.