Charts in php
Posted 06 February 2013 - 01:50 PM
Is it possible to use the charts shortcode in PHP? I would like to show charts of user generated data.
Posted 06 February 2013 - 04:07 PM
To clarify, how do you intend on incorporating both? Like, adding the shortcode inside a PHP tag?
Posted 06 February 2013 - 04:57 PM
Let me try and understand this, you want to execute a shortcode within PHP?
If so you can use the wp function do_shortcode()
Posted 07 February 2013 - 11:37 AM
Sorry for the short explanation.
I would like to show a chart on each post using the data which is stored in the custom fields of that post. Every post has different data to show (user generated). Is there a way I can use the chart option Pagelines offers? What is the best way to do this with Pagelines?
I was trying to do this with Google charts API, but I was running into trouble to get server side data into a client side generated chart. Thisfrom Google is helpful, but I don't know how I can get custom fields (it needs the loop) using an ajax call.
Posted 07 February 2013 - 12:14 PM
If I am totally honest, I wouldn't really have any idea how to achieve this. However, I did do a search and found this plugin which uses custom fields apparently.
If the plugin isn't for you, I would recommend contacting one of our Pros, who may be able to assist you -
Posted 15 February 2013 - 05:26 PM
I made a little plugin. It uses the wordpress buildin ajax functionality to get the metadata from the post and display it in a google chart. Let me know if you want to have the code.