Support » Plugin: Posts By Tag » use calling posts tags (update-code)

  • Resolved HeliR


    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

Viewing 1 replies (of 1 total)
  • Plugin Author Sudar Muthu



    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.