Beesten
Forum Replies Created
-
Forum: Plugins
In reply to: [GaugePress] Dynamic input possible?Alright, got it to work, seemed to matter where in the template-file I added the “echo do_shortcode” thing. Worked just fine when I wrote it below the “get-header()” part. I’m a total beginner! Anyway it was no problem to pass a variable $distance to the shortcode using the code above. Efxaristo poli!
I’m off to the the rating-section 🙂Forum: Plugins
In reply to: [GaugePress] Dynamic input possible?Thank you for the answer! I will certanly look into trying to edit the source code.
Another way I thought could work was calling the shortcode from a template with some additional php that does the database queries. For some reason I cant even get the static example shortcode to work?!
I’ve made a template I’m using with the particular page. In the template I use following code:<?php echo do_shortcode('[gauge width="400px" height="220px" value="80" min="0" max="150" title="First Gauge" label="km" showminmax="true" color="#E16300" backcolor="#EDEDED" widthscale="0.8"]'); ?>This produces nothing unfortunately. If this would work I would like to see if one could pass a numeric variable, for example $distance, like this:
<?php echo do_shortcode('[gauge width="400px" height="220px" value="'.$distance.'" min="0" max="150" title="First Gauge" label="km" showminmax="true" color="#E16300" backcolor="#EDEDED" widthscale="0.8"]'); ?>Any ideas why the above isn’t working?
If I could get this to work I would officially adore your plugin 😉