Support

Account

Home Forums Front-end Issues Frontend form Edit Post link Reply To: Frontend form Edit Post link

  • This didn’t seem to work for me, but I didn’t spend much time looking through the link you provided. I had, in the meantime, cobbled together another solution that may work for someone else as well:

    Goes below your single-post display, within the post loop

    <div class="edit-form">Edit this submission</div>
    <div class="form-off"><?php acf_form(); ?></div>
    
    <script>
    $ = jQuery;
    	$(".edit-form").click(function(){
    		$(".form-off").toggleClass("form-on");
    		$(this).toggleClass("form-on");
    	}, function() {
    		$(".form-off").toggleClass("form-on");
    	});
    </script>

    In your stylesheet

    .form-off {
    	visibility: hidden;
    }
    
    .form-on {
    	visibility: visible;
    }

    This may not be the most elegant way to do things, but it worked for me.