I have one php file in wordpress where have a php variable
$tt->name I want to convert into a shortcode so I canuse it somewhere else on the website.
Let me explain step by step. First I have search where user choose taxonomy and then type in search box and click on search.
On search result page, taxonomy is as
$tt->name (Because there are 3-4 types of result, depend on what user choose, like if 1st taxonomy then another result and if 2nd taxonomy then a message, if 3rd taxonomy then a pic and so on..
But all on the top have line, "You have chosen taxonomy 1" and that 1 is
$tt->name in code actually. Now there is a form just in next with title, contact us and there is a field which I want value of
$tt->name. That's why I need shortcode. Because I want to use this shortcode somewhere else in the website.
Any solution for this?