Tagged: V3
- This topic has 19 replies, 2 voices, and was last updated 5 years, 9 months ago by Anonymous.
-
Anonymous(Private) March 22, 2019 at 9:52 am #205982
Is the page loading using Ajax? If so, that will be the issue, as the player you are using needs reinitialising after an Ajax load. What player are you using?
I am using Ajax to load the page. I am using standard WP audio shortcode.
I turned Ajax off and all is good now. Thanks!<?php if( get_field(‘my_custom_field’) ):?>
<p>My Custom Field Value: <?php the_field(‘my_custom_field’); ?></p>
<?php endif; ?>thanks, I will try
PS Very good support speed!
Anonymous(Private) March 23, 2019 at 5:52 am #206075As to ACF fields. Let us assume it is a single value field use key is my_custom_field and the prefix required is My Custom Field Value, then the PHP is this:
I did it and it works. But again, there is a shortcode (button) in this field and it’s not working. Just showing me shortcode texts:
https://drive.google.com/open?id=17Y89ciQhBGyEegIogWIVu8UgCDow67AoHow to solve it?
Trevor(Private) March 23, 2019 at 6:57 am #206079Did you try wrapping that code in a do_shortcode function?
<?php if( get_field('my_custom_field') ):?> <p>My Custom Field Value: <?php do_shortcode(the_field('my_custom_field')); ?></p> <?php endif; ?>
I am not sure if that would work. Otherwise you may need to use PHP string functions to fetch the string as before, then split it up into before the button shortcode, the shortcode and the what comes after, and then handle them, with the shortcode being output in a do_shortcode function.
-
AuthorPosts