Title: use calling posts tags  (update-code)
Last modified: August 20, 2016

---

# use calling posts tags (update-code)

 *  Resolved [HeliR](https://wordpress.org/support/users/helir/)
 * (@helir)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/use-calling-posts-tags-update-code/)
 * Hi friend,
    to update your plugin to automatically use the calling-post’s tags
   I have made following changes – added mytags in the shortcode_handler – options–
   added “if ($mytags) { …..
 * then you get a plugin that automaticalle links with the recent posts from the
   posts tags, super usable!
    I am using tags to mark my posts, have about 1000 
   Pages with about 150 different tags, so I can easy concat those posts with the
   same tags.
 * tx a lot for your plugin
    _ function shortcode\_handler($attributes) { $options
   = shortcode\_atts(array( “tags” => ”, // comma Separated list of tags ** “mytags”
   => TRUE, // es werden meine eigenen Tags genommen** “number” => 5, “exclude” 
   => FALSE, “exclude\_current\_post” => FALSE, “excerpt” => FALSE, “content” =>
   FALSE, ‘thumbnail’ => FALSE, ‘order\_by’ => ‘date’, ‘order’ => ‘desc’, ‘author’
   => FALSE, ‘date’ => FALSE, ‘tag\_links’ => FALSE, ‘link\_target’ => ” ), $attributes);
 *  $options = pbt_validate_boolean_options($options, $this->boolean_fields);
    $
   tags = $options[‘tags’];
 *  ** if ($mytags) {**
 *  $posttags = get_the_tags();
    if ($posttags) { foreach($posttags as $tag) { $
   test = ‘,’ . $tag->name; } $tags = $test; } }
 *  // call the template function
 * [http://wordpress.org/extend/plugins/posts-by-tag/](http://wordpress.org/extend/plugins/posts-by-tag/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Sudar Muthu](https://wordpress.org/support/users/sudar/)
 * (@sudar)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/use-calling-posts-tags-update-code/#post-3486190)
 * Hello,
 * Thanks for the sending in the code. But the feature is already available in the
   Plugin 🙂
 * If you leave the tags empty, then by default it will pick up the tags from the
   current post.

Viewing 1 replies (of 1 total)

The topic ‘use calling posts tags (update-code)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-by-tag.svg)
 * [Posts By Tag](https://wordpress.org/plugins/posts-by-tag/)
 * [Support Threads](https://wordpress.org/support/plugin/posts-by-tag/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-by-tag/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-by-tag/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-by-tag/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sudar Muthu](https://wordpress.org/support/users/sudar/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/use-calling-posts-tags-update-code/#post-3486190)
 * Status: resolved