Plugin program: JQuery not working in this plugin

Firstly I’d suggest wrapping your JS like this: (function ($) { $(document).ready(function(){ $(“#Yes”).click(function(){ $(“.apptype”).show(); $(“.specify”).hide(); }); $(“#No”).click(function(){ $(“.specify”).show(); $(“.apptype”).hide(); }); }); })(jQuery); You’re also enqueuing jQuery twice, and the above the above script twice…. and with your shortcode you don’t need to declare the DOCTYPE, or wrap your from in an HTML tag. I would … Read more

ACF Shortcode bringing in my shortcode is adding unnecessary line breaks

It was solved by a coworker. function removebreaks($content) { $content = str_replace(‘<br>’, ”, $content); $content = str_replace(‘<br/>’, ”, $content); $content = str_replace(‘<br />’, ”, $content); $content = str_replace(‘<BR>’, ”, $content); $content = str_replace(‘<BR/>’, ”, $content); $content = str_replace(‘<BR />’, ”, $content); return $content; } add_filter(‘acf_the_content’, ‘removebreaks’);

Custom field front end update in wordpress

You would need to add your form to each post, adding in a hidden input with the post id each time. Then, when the nonce validates, be sure to read the passed in post id and use that with update_post_meta. For example if ( isset( … ) ) { $target_post_id = ( isset($_POST[‘target_post_id’]) )? (int)$_POST[‘target_post_id’] … Read more

Turn Autocomplete on

Unfortunately, there’s no hook available to change it. You can see it in wp-admin/edit-form-avanced.php: <label class=”screen-reader-text” id=”title-prompt-text” for=”title”><?php echo $title_placeholder; ?></label> <input type=”text” name=”post_title” size=”30″ value=”<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>” id=”title” spellcheck=”true” autocomplete=”off” /> You’ll have to change it using JavaScript when the page has been loaded. I made a little plugin … Read more