We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2586184
Dynamically loading shortcode
Closed

Comments

  •  4
    Daniel started the conversation

    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 

  • [deleted] replied

    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 

    add_shortcode('ameliacatalog', array('AmeliaBooking\Infrastructure\WP\ShortcodeService\CatalogShortcodeService', 'shortcodeHandler'));


    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.