It sound like you can accomplish this with 2 PHP functions.
1) Save the searched taxonomy to the user’s session. When they re-run the search function, update the taxonomy that was searched. This way if its saved to their session, you can use it elsewhere on the site just for that user.
2) Create a shortcode to display that saved taxonomy.
// ... search function that gets $tt.
save_searched_taxonomy($tt->name);
//...
function save_searched_taxonomy($taxonomy){
$_SESSION['searched_taxonomy'] == $taxonomy;
}
function get_searched_taxonomy_shortcode(){
return $_SESSION['saved_taxonomy'];
}
add_shortcode('searched_taxonomy', 'get_searched_taxonomy_shortcode');
Then on other pages, you can call your shortcode and have it refer to whatever that user searched for.
[searched_taxonomy]
Related Posts:
- Is there a way to parse shortcodes in PHP?
- Shortcode to insert
- Shortcode putting html such as
- Display sorting options dropdown when using WooCommerce product category shortcode
- Retrieve multiple values passed to a single attribute in a shortcode
- Export User Info to CSV from Front End
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Using Echo in ShortCode – Stuck
- Add/echo div with Analytics-Code to function in functions.php
- Multiple do_shortcode($content) within one shortcode
- My shortcode is showing up twice
- How can I default to all WordPress roles when parameter is not included in shortcode?
- WordPress menu deletes when trying to add a hook
- PHP contact form returns warning in text widget [closed]
- How to find the output of contact form 7 shortcode? [closed]
- How do i get (unique) page name?
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Recent post display using shortcode
- Browser title script ignoring is_page /else conditional [closed]
- Nested shortCode functions in the functions.php file
- Need to turn this php into WP shortcode
- Making Quote Plugin more efficient
- How to limit the content coming from wordpress shortcodes?
- custom shortcode will not display the wrapped content
- Create shortcodes within foreach loop (using array)
- Trigger popup in a php if/else statement
- Append HTML Using Shortcode
- How to output a PHP file values by shortcode?
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Creating own shortcode – echoeing php variable based on JS variable
- How create a Shortcode with hover and complex options
- Remove from shortcode
- Shortcode to show the code
- Get URL from shortcode tag
- Multiple do_shortcode in page template
- Shortcode from a function not working
- Is it possible to return content, and then also continue to do other things?
- $wpdb returns duplicate posts
- Creating WordPress Shortcode with Variable
- Catchable fatal error: Object of class stdClass could not be converted to string
- Shortcode to find and replace URL
- Could use some help with Shortcodes
- How to put a form with php code into a variable or shortcode?
- Shortcode to embed Edit Account form not working
- Handling PHP/HTML inside the output of a shortcode function
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Split shortcodes to array of shortcodes
- Shortcodes showing in excerpt despite using strip_shortcodes
- PHP error with a shortcode: “no suitable wrapper” for file_get_contents
- How to make a conditional statement within $output in shortcodes.php?
- How to get my [shortcode] rendered on the home page, other pages are fine
- Shortcode displaying at the top of the page [duplicate]
- MySQL Query Returns Array () In Shortcode
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- How to exclude labels from certain categories in a shortcode?
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- Trying to call dynamic content into a 3rd party shortcode
- Shortcode in Shortcode/HTML Graphics and Pictures
- Why is the current page loaded in the pop-up window and not the specified one?
- How to search order using database frontend short code WordPress
- How to add a shortcode which runs a .php file for the current post
- Block error message in foreach loop when looping through ACF field
- Get title of page containing post grid within the posts
- How can I prevent a shortcode div from extending beyond its boundaries?
- PHP multiple forms, same page, isset($_POST[]) not working?
- shortcodes, custom php and their errors
- Echo short code syntax
- How to return html as a string from php for WordPress
- Changing Date Format on Custom Meta Data w/shortcode call
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Add the shortcodes from the enfold theme to the other theme
- Offset with ajax load more posts duplicates
- Get posts by id using shortcode
- Short code into PHP
- How can i iterate through this shortcode array?
- Add two or multiple functions in WordPress Post or Page
- Shortcode in a $output statement
- Need help with PHP functions
- When using shortcode, content stops generating after the_content
- PHP Shortcode – 500 error
- Run PHP Results inside WP Shortcode
- problem multisite with blog id
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- Using the same shortcode to show any table from the database
- Shortcoding with Divs
- Custom Shortcode with Dynamic Button
- My title is showing after the shortcode
- Shortcode to include PHP file, pass various parameters to include?
- Is there a better way to output HTML as a shortcode?
- Gutenberg – render_callback does not pass ToggleControl value on frontend
- HTTP 500 Error after Creating Shortcode
- How call WordPress shortcode inside function file
- How to execute a shortcode within a custom field?