Hi there,
Long time lurker first time poster.
I have used WordPress to host websites for quite a while, but my newest undertaking is overwhelming me a bit.
I have 5 pages with about 2000 lines of code producing data visualizations with charts, filters, etc. Each page is different from one another, but they’re fairly similar in their construction.
Historically, for small snippets of PHP and Javascript, I have either used a plugin that will put the code in, or created a function in my own website’s custom plugin, but the first one seems to have trouble with how large this code is, and the second turns off the functioning of all the other sites with code snippets.
So I come to you, the braintrust.
For websites that include complex-code, what is the best way to integrate into WordPress?
1) Design a file full of shortcodes, then reference the shortcode on each respective page?
2) Build out another custom plugin and bring all of my pages (complex or not) into that?
3) Something else I haven’t thought of?
Is it possible to simply render the content of a page elsewhere and then just load the elements via a simpler wordpress shortcode or something like that? So my (unformatted) page would be at /data.php and my shortcode would just say content = data.php?
I appreciate any help or thoughts on how to best tackle this.
[ad_2]