Posted By

sdxxx on 12/03/10


wordpress shortcode

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


WP Shortcode - retrieve author page url

 / Published in: PHP


Using shortcode to retrieve the author page url (ex., using the WP Shortcode API as reference.

  1. //retrieve author page url (ex. by using shortcode [XXXXX id=123]
  2. function XXXXX_func($atts) {
  3. extract(shortcode_atts(array(
  4. "id" => '1'
  5. ), $atts));
  6. return get_author_posts_url($id);;
  7. }
  8. //add shortcode [XXXXX id=123]
  9. add_shortcode('XXXXX', 'XXXXX_func');

Report this snippet  

You need to login to post a comment.