• I have a custom post type (using the freebie version of Toolset Types) filled with custom fields, lets call it “specifications-post”. I can call each field into my page with a short code. This code needs two attributes: a number (or text string) as its ID attribute and a field attribute to call a specific field value from the custom post.

    The field attribute will vary across the page as I call different fields, but the ID will always be the same since it’s calling from the same grouped set. If I need to call that ID code in fifteen different places in the same page, I have to fill it in every single time.

    If I could assign that code just ONCE to a single string in one place on the page, I could minimize the labor and the troubleshooting, so is there a way to assign a value to a specific string that we can call “my_post_id” so that I can substitute that value in every shortcode call across the page?

  • The topic ‘can I set a single page variable to call specific shortcodes’ is closed to new replies.