How do you combine Elementor with my custom php code?
-
Okay so I am developing a custom child theme of OceanWP and I have custom post types that all use the same Elementor single page template which uses a loop element template to display events from an API request that involves that custom post type specifically.
Basically, I need to self-generate the event info on the go and display it within my Elementor Loop template which is being shown within an Elementor Posts element. It works for now because each event I get from the API is being turned into another Custom Post type called Event and that event has Advanced Custom Fields that are linked to the Elementor Loop template dynamically.
But I cannot keep creating Event custom post types for every event as there are literally tens of thousands of them and instead I just want to inject the info I get back from the API directly into my Elementor Loop template from my PHP code.
How do I set information through my PHP code into my Elementor element? I know shortcodes exist but how would shortcodes help in my scenario since I need to inject dynamic data from code into an Elementor element on my site?
Is what I’m even asking possible?
The topic ‘How do you combine Elementor with my custom php code?’ is closed to new replies.