WordPress.org

Forums

TPG Get Posts
[resolved] Pass variable into a filter criteria (2 posts)

  1. epyscs
    Member
    Posted 2 years ago #

    I have a site using a Woocommerce shop page, and I want to pass these variables into the TPG_GET_POSTS code...

    So far I have this in my code and it works well:
    echo do_shortcode('[tpg_get_posts tag="XYZ" category_name="news" show_meta="false" show_entire="true" show_byline="false" ]');

    but I want to pass in a variable into the tag field... any thoughts how i would do this?

    Cheers

    http://wordpress.org/extend/plugins/tpg-get-posts/

  2. cswaim
    Member
    Plugin Author

    Posted 2 years ago #

    something like this:

    echo do_shortcode('[tpg_get_posts tag="'.$myvariable.'" category_name="news" show_meta="false" show_entire="true" show_byline="false" ]');

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TPG Get Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.