** Ignore this – I have asked a similar question a few months ago **
Alternatively – is there a way I can get the file field form within the Java file – currently using – field name ‘gas_elec_data’
// Set up data source
chart.dataSource.url = “https://weareinteb.co.uk/wp-content/uploads/data/gas-elec-monthly.csv”;
Hi John ….
Once again, many thanks for your response. Will have a play and try and teach myself.
However, had another idea and found an article you wrote in 2016 and have found a way around it for now. I have added the upload_prefilter to rename the file and also change the destination for the upload – therefore the csv filename and location will be constant.
Many thanks.
Matt
Not 100% sure – but the screen shot attached shows the Javascript sat within a WordPress AMCharts page control but based upon having tried all permutations of the basic ‘the_field’ … and still no success I guess it may not be an easy wish then!
Hi John ….
Thanks for your help.
It is set to ‘file url’. I suppose my question is more – Within the Javascript – should I be able to simply change the csv url from:
chart.dataSource.url = “../wp-content/uploads/2021/05/sample_data_serial.csv”;
To:
chart.dataSource.url = “<?php echo the_field(‘gas_data_file’, ‘option’); ?>”;
or if I have to something more fancy like I have seen in a few support posts already (sorry Java is not my forte…) like create a value from :
var datafile = <?php echo the_field(‘gas_data_file’, ‘option’); ?>;
and then add this in to the Java …. if so, it is here I am not sure how to write this last element.
Thanks – I had tried that already but did not work.
Hi John ….
It is on the front_page template – ie the home page. I simply want a block of 6 images with h3’s which all link to the chosen category in WooCommerce.
Thanks in advance.
Matt
Hi John ….
I thought I had done this but I must have missed something …. as have now worked it out and managed to kill that plugin on the specific page.
Many thanks for your assistance.
Matt
Evening ….
Yep, acf_form_head() is before the get_header() and both wp_head() and footer are called in the theme.
Matt
Thanks topdotter…
I have looked at various articles but like that one, most are based upon having expected results in the rows to sort by.
My request seems fairly simple – I can easily sort posts based upon a date picker field in a non repeating field …. so why is it so difficult in a repeater – or better still where do I find the instructions.
I have been told by Support that the following should work … but I cannot get it to work.
‘post_type’ => ‘films’,
‘posts_per_page’ => 10,
‘meta_query’ => ‘film_captures_%_capture_date’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘DESC’
Really am desperate to get this working before I have to ditch it and go another route so any thoughts or guidance would be gratefully received.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.