Posted By

lajevardi on 02/22/09


wordpress idevcenter shortcode

Versions (?)

iDC WordPress Shortcode (param-less)

 / Published in: PHP

Shortcode to insert rank in a WP blog post. it doesn't need the id parameter to be passed. (more efficient one)

  1. function idcRankHandler(){
  2. $url = rawurlencode(get_permalink($post->ID));
  3. return '<a href="'. $url .'" class="idcRankAnchor">'
  4. .'<img src="'.$url
  5. .'" title="Vote on" alt="Vote on" class="idcRankImage" />
  6. </a>';
  7. } add_shortcode("idc","idcRankHandler"); //Attaching iDC handler

Report this snippet  

You need to login to post a comment.