apparently I found the solution (thanks to amatorpl), if anyone needs it:
function show_history() {
$user = wp_get_current_user();
$user_email = $user->user_email;
$show_history = '[shortcode_name search="'.$user_email.'" show="url, color, size"]';
$history = do_shortcode($show_history);
return $history;
}
add_shortcode('show_history', 'show_history');
Thanks for the try
Related Posts:
- Passing attributes to shortcode dynamically
- Remove HTML content if attribute is not set / variable attributes
- Shortcodes and a list of IDs?
- Turning variable into a value set in shortcode
- Substite Category Slug in a Shortcode
- Check if parent page has child page of certain slug
- Multiple values for one variable
- Add audio file to post using custom term meta field as link [closed]
- Class variables in shortcodes
- Shortcode with multiple variables
- About redundant code when I use shortcode to output the HTML from a variable
- Conditionally Loading JavaScript/CSS for Shortcodes
- Show shortcode without executing it
- How does a shortcode work?
- Run visual composer code in php page
- Remove wptexturize from a shortcode?
- Using shortcode in Post title
- Audio or playlist shortcode condition according to the amount of files on attachment page
- Does a shortcode with a single attribute have to use an array?
- template_redirect to accompany with a shortcode
- Tinymce shortcodes within shortcode contents
- Post loop created via shortcode not displaying shortcode in content
- Pass shortcode variables to template
- passing multiple parents value into a shortcode
- Is it possible to add a repeater field to TinyMCE’s option window?
- How do I preview the result of a shortcode in the TinyMCE editor?
- Shortcodes: Pros and Cons
- esc_attr not working in shortcode
- Raw output (preventing wpautop)
- Conditionally loading Facebook PHP SDK in shortcode
- Are .MP3 files with capital letter extensions allowed in [audio] shortcode?
- How to handle shortcodes when using the JSON API
- Are shortcode functions applied while rendering the content, or are they executed and stored with the post content?
- is_admin() returns false in save_post hook with Gutenberg editor
- Why are Shortcodes Disabled in Widgets by Default?
- Get Posts shortcode plugin and meta_query?
- possibility to control embedded video timeline with buttons and links external to the player
- Add custom setting that uses radio button to WP Gallery
- WordPress Gallery shortcode: Display one category ID only
- How to get gallery id inserted to a post?
- WordPress Shortcode show database row
- Custom shortcode is not working in text widget
- Shortcodes won’t work on live environment
- Use shortcodes in terms description? [closed]
- Adding to the_content or a variable from within a shortcode function
- Shortcode: text content ends up outside html tags
- How to wp_redirect on ‘init’ hook on condition of current post id?
- Basic do shortcodes question
- What is this format called (nested shortcodes)?
- Problem with height in video shortcode
- Shortcode not showing $content in correct place
- Best tools for preparing and styling a table [closed]
- How can I insert a shortcode in the title tag of another?
- Shortcode inside text widget do not call enqueue style
- How to execute a shortcode outside the post content/entry in a theme?
- Metabox Keeps Stripping Parts of Shortcode
- Form processing: How to process form before output and access data from shortcode
- How to Retrieve data of Gallery Shortcode and display it above a post
- Checking post content for a shortcode, but content is being returned as empty
- do_shortcode() won’t return PHP Array
- Shortcode and variable
- contact form 7 :create shortcode usable in email message [closed]
- Show shortcode only in posts
- Better way to display multiple plugin output on the same page?
- get_queried_object_id / short code returning blank
- Shortcode won’t take into account custom post ID put in parameter
- Color on Shortcode insert that creates a button
- shortcode doesnt work on excerpt
- Adding Author URL to Nav Menu via Shortcode
- Displaying an interactive web map on my wordpress site
- Date Shortcode in Image alt and title tags
- access shortcode atts in template part
- Pagination for custom posts loop
- Modify [caption] shortcode so and are not used?
- May an attribute have no value?
- How to Call Related Post based on Categories Inside Post Content with Shortcode?
- SQL query to bulk change short code in all posts
- Display shortcode in text field with wordpress settings api
- How to strip header tags & shortcodes from the_excerpt()
- shortcode display metainformation as linked image
- Reusable Dynamic Taxonomy Shortcode
- How to display a page dependent on a url parameter supplied by a form/button page?
- How to insert visual compser post grid shortcode in a custom page template? [closed]
- WordPress plugin shortcodes not outputting anything
- WordPress Gallery with ID’s Shortcode not Working
- Featured image with link to post shortcode, image displaying above the post
- Manipulated shortcode output
- Where is escaped the shortcode?
- How to stop unwanted splits in excerpts when using shortcodes for sliders or players
- Changing layout of defaul gallery output to masonry
- shortcode change variable base on user
- Inserting shortcode is blanking excerpt – any ideas?
- If do_shortcode is blank, return some message
- Previous/Next with the same category
- I’ve broken the short code for Contact Form 7!
- echo a shortcode in a shortcode code?
- Applying if (get_post_meta) to new shortcode
- Nested ShortCode works inside the_content, but not outside of it
- Why does my shortcode query not working with search term
- How to use multiple values in “Shortcode”? [closed]