Posted By

Ben on 02/13/10


Tagged


Versions (?)

Wordpress Shortcode


 / Published in: PHP
 

  1. <?php function my_example() {
  2. return 'my example text';
  3. // or echo
  4. } ?>
  5. <?php add_shortcode('mytest', 'my_example');?>
  6.  
  7. Then add [mytest] to the post.

Report this snippet  

You need to login to post a comment.