• Has anybody looked into how to (safely) get a parameter from the URL and use that to populate the meta_value query?

    I’m looking at showing a custom post type entry based on a custom field.

    [display-posts post_type=”punkter” meta_key=”samtaleid” meta_value=”346″ include_content=”true” include_title=”false” no_posts_message=”Sorry, no items available yet.” wrapper=”div”]

    This works as intended, but I need to populate meta_value with a parameter from the URL.

    Using a plug-in to get the parameter works fine, but using a shortcode for that within Displat Posts shortcode does not work.

    Any ideas?

    • This topic was modified 4 years, 6 months ago by tawaterhouse.
    • This topic was modified 4 years, 6 months ago by tawaterhouse. Reason: readability
  • The topic ‘meta_value from URL parameter’ is closed to new replies.