Support » Plugin: TPG Get Posts » tag vs cat

  • Resolved TimCarey

    (@timcarey)


    Referring to the following short code:
    `
    [tpg_get_posts fields=”title,content,byline” title_link=”false” shorten_content=”w400″ cat=”UpFront” numberposts=3 orderby=”date” ul_class=”tpg-ul-class” title_tag=”h2″ post_content=tpg-content-class]
    `
    The above code works fine. But instead of category (cat) I would like tags (tag). When I change cat to tag and add the correct tag (UpFront) to a post I get no input. I have tried everything please help.

    https://wordpress.org/plugins/tpg-get-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Criss Swaim

    (@cswaim)

    Looking at the doc, the tag uses the slug and not the tag name. You can look at the list of tags Posts -> Tags to get the slug value. Usually it is the tag in all lower case with blanks replaced by -.

    Please let me know if using the slug works for you.

    Thread Starter TimCarey

    (@timcarey)

    Can you please explain what you mean better. I want to show the posts having certain tags on my front page.
    Here is a statement from the documentation website:
    “A common usage is to show post on a page that have a common tag(s):”
    [tpg_get_posts tag="tag1, tag2,tag3"]

    Plugin Author Criss Swaim

    (@cswaim)

    go to the posts in the dashboard and click on tags. This will show all your tags and the tag slug. It may show the id if you have installed a plugin to display ids.

    from the doc, options tab:
    tag
    This allows for the selection of posts by tag (slug).
    tag_id
    This allows for the selection of posts by tag id.

    if your tag is UpFront then the slug is probably upfront. The tag parameter requires the slug.

    Thread Starter TimCarey

    (@timcarey)

    Thank you for your help. I would suggest to everyone when you add a tag directly from a post made sure you hit update for the post. Or go directly to all tags

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘tag vs cat’ is closed to new replies.