Hi, I'm trying to dynamically load shortcodes on a page from an ajax call by calling a function in my functions.php file. My function returns `echo do_shortcode("[ameliacatalog]")` , so my expectation is that I would get all relevant html back however I only get the string "[ameliacatalog]" returned to the page.
I'm guessing that the shortcode isn't available in functions.php for some reason, is there a way to enable it there, or could you please explain to me how I could directly access the functions that the shortcode is calling on?
Apologies for replying a bit later, we don't work on weekends.
It probably can't be done that way, unfortunately, in Amelia Vue framework is used , so the HTML that would be returned with the do_shortcode will return only that HTML, not the script itself.
You can checkout how the shorcodes/functions are called out in the ameliabooking.php script. For example, it is enough for you to add this
Hi, I'm trying to dynamically load shortcodes on a page from an ajax call by calling a function in my functions.php file. My function returns `echo do_shortcode("[ameliacatalog]")` , so my expectation is that I would get all relevant html back however I only get the string "[ameliacatalog]" returned to the page.
I'm guessing that the shortcode isn't available in functions.php for some reason, is there a way to enable it there, or could you please explain to me how I could directly access the functions that the shortcode is calling on?
Thank you
Hello Daniel,
Apologies for replying a bit later, we don't work on weekends.
It probably can't be done that way, unfortunately, in Amelia Vue framework is used , so the HTML that would be returned with the do_shortcode will return only that HTML, not the script itself.
You can checkout how the shorcodes/functions are called out in the ameliabooking.php script. For example, it is enough for you to add this
and it will return the HTML , but you will need to call out the other scripts as well, and to dynamically start Vue.
Hope this helps. Unfortunately, we can't help out more with this, as such customization isn't covered by our support.
If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.