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
- current_shortcode() – detect currently used shortcode
- Get shortcode name from within it’s callback function? [duplicate]
- Tinymce – How to hook before or after live shortcodes rendering?
- How to customize a shortcode using the customizer
- Stray closing paragraph tag when using shortcodes
- The result of a shortcode appear BEFORE page content
- Getting the count of a shortcode that is nested
- Getting attribute value from shortcode
- Get shortcode attributes outside shortcode function
- Problem with email_exists in shortcode
- Alternate text if shortcode returns no data
- sql query in shortcode not working
- Global, network-wide shortcodes or text replace functions
- Video size and border radius using a shortcode
- How to use div class between the shortcode variable?
- wp_editor returns the shortcode and not render the output
- Prevent wordpress from rendering shortcode in post
- Error do_shortcode In WooCommerce Template
- Embedding Instagram via shortcode doesn’t work as advertised in official docs
- Execute shortcode only once in the page
- Can a shortcode return its own name?
- $content not null in shortcode, even though it is self closing
- Nesting shortcodes results in the inner shortcode being placed AFTER outer shortcode
- i have create shortcode that work but not perfect coding
- menu item to display the most recent post
- how to format / execute post content and shortcode?
- Gravity forms – get shortcode attribute from post content
- How to get the $atts of a shortcode
- Getting the count of a shortcode that is nested
- Creating a short code with php inside
- Is it possible to modify the header with a content shortcode?
- Custom shortcode breaks my page
- Custom shortcode is causing a WSOD
- this simple shortcode doesn’t generate Collapse as supposed
- Shortcode outputting at top of content
- Will a shortcode placed inside a paragraph tag still be valid?
- Get attributes of nested shortcodes
- Shortcode Strategy
- Enclosing Shortcode is acting like self-closing
- How to create a shortcode to let the user add the ID of a YouTube video?
- How do I define and register a shortcode function in a namespaced functions.php file?
- Change user meta value with shortcode
- How to add shortcode to html widget
- Implementing a URL Shortener
- WordPress User ID as Shortcode
- Add div on EMED Tag
- Clean way of using ob_start() and ob_end_clean() in wordpress
- Theme Convert PHP code to shortcode
- find shortcode inside content of post
- WordPress Short code for List style
- Processing a login/register form before shortcodes are rendered?
- Adding a cover image to video shortcode
- Insert First Image into post (full-width)
- Show content if user left comment / non-logged visitors?
- How to insert current user ID/entry ID into a shortcode?
- Need help with creating a simple shortcode
- Using a WP shortcode in Homepage
- i want to show a modal when user lands on home page very first time
- How to use multiple (or array) values in $content of shortcode?
- How to display content if user meta data isn’t empty with shortcode
- How to display total user count by specific role in WordPress as statistics?
- User name in referral URLs
- How to style inline code in block editor?
- Is it possible to capture the content outside/between shortcodes?
- Add Style to text in a PHP block
- How to add new images to existing shortcode configuration?
- Content included from pagination
- How to completely prevent WordPress from destroying/modifying my shortcode outputs?
- Is it inefficient to repeat a Shortcode 100 times on a page?
- tinymce custom button
- Running Filter or Shortcode Before Query Prevents Excerpt from Showing
- Replace custom gallery shortcode with default gallery shortcode
- WordPress Payment link will not transform PHP vars into values
- Referring to site URL in shortcode argument
- How WordPress Displaying Shortcode In Post Content?
- Shortcode not accepting atts
- the_time function inside HTML dom parser
- Code auto escaping is not working when using short codes
- Shortcodes: Return different based on atts
- Shortcodes in Options Panel textareas
- wp_register_script and wp_register_style when shortcode is used
- Good example of a short code +4346? [closed]
- How can I hide the ACF shortcode when empty
- How to pass text input data to shortcode
- Using variable as shortcode parameter
- How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?
- conditional shortcodes
- shortcode appears as text in the search result
- What’s the syntax for embedding a Goggle sheet in a shortcode?