Posted By

scottnix on 10/06/11


Tagged

insert php html conditional thematic


Versions (?)

Thematic Insert Random HTML with condition


 / Published in: PHP
 

URL: http://scottnix.com/code/wordpress/thematic-snippets/

Insert a random div example with WordPress conditional logic to a Thematic action hook.

  1. // add random div with conditional set
  2. function snix_quick_div2() {
  3. if (is_single()) { ?>
  4. <div class="social-links">
  5. HTML FOR SINGLE POST ONLY
  6. </div>
  7. <?php }
  8. else { ?>
  9. <div class="other-links">
  10. HTML FOR EVERY OTHER PAGE
  11. </div>
  12. <?php }
  13. }
  14. add_action('thematic_abovefooter','snix_quick_div2');

Report this snippet  

You need to login to post a comment.