I have run into an odd issue where on every WYSIWYG ACF field, while viewing an image attachment page (attachment.php), the attachment image gets inserted into the ACF field.
You can see that happening here:
What gets inserted to the ACF field:
<div class="address-footer-col1"> <p class="attachment"> <a href="https://yourvoiceprotected.ca/wp-content/uploads/2014/04/PIC_slide03.jpg"> <img class="attachment-medium" width="300" height="85" alt="PIC_slide03" src="https://yourvoiceprotected.ca/wp-content/uploads/2014/04/PIC_slide03-300x85.jpg"> </a> </p> <p> Head office: <br> Public Interest Commissioner <br> 10303 Jasper Avenue NW, Suite 2800 <br> Edmonton, AB T5J 5C3 </p> </div>
I have done some testing and, while viewing an attachment.php page, and I have noticed the following things:
-The attachment image is inserted only when it is an WYSIWYG ACF field. Text area ACF fields do no have the problem, as shown by the copyright line in my link.
-This occurs on ‘options’ page fields
-This occurs on ACF fields pulled from other pages IE)
get_field( 'mission_statement', 1448 );
-This occurs even if I delete all the code on the attachment.php file, and leave in only the
get_footer(); calls. Any ACF WYSIWYG field in the footer or header will still have the attachment image inserted into it.
Any insight or advice would be much appreciated.
WP 4.1.1 + ACF 126.96.36.199. Still have this issue on attachment pages slash attachment permalinks. Somehow the attachment image gets included/injected in all following wysiwyg fields after the attachment (as in the footer in my case). This is really weird and if I remember correctly this actually have been solved in a earlier version, so I suspect it’s a bug that has come back.
Let us know if you can have a look on this issue..
You must be logged in to reply to this topic.
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!
© 2022 Advanced Custom Fields.