Problems with ACF
-
Hi
Thanks for a really useful plugin. Unfortunately, I’m having some problems with ACF fields.
I am using ACF and the Insert PHP plugins to create next/previous links for series of articles.
The code I’m using is:
<div class="next-previous-links">[insert_php] if(get_field('previous')) { echo '<a class="previous-link" title="go to the previous page in this series" href="' . get_field('previous') . '"/><i style="position:relative;top:1px;" class="icon-arrow-left"></i>?Previous</a>'; } if(get_field('next')) { echo '<a class="next-link" title="go to the next page in this series" href="' . get_field('next') . '"/>Next<i style="position:relative;top:1px;" class="icon-uniE637"></i></a>'; } [/insert_php]</div>
The ‘Previous’ link is aligned to the left and the Next to the right with a border top and bottom. When wp-typography is active the underlying html still seems correct – here’s some sample output:
<div class="next-previous-links"><a class="next-link" title="go to the next page in this series" href="{correct url from the ACF next field}/"></a>Next<i style="position:relative;top:1px;" class="icon-uniE637"></i></div>
But the links are no longer styled as links, and aren’t clickable, and nothing happens on hover. Also while the styles in the ‘next-previous-links’ class work OK, the styles in the ‘next-link’ class only partially work:
The CSS is:
.next-link { float:right; text-transform:uppercase; }
The text-transform works, but the float doesn’t.
I’ve tried using the wp-Typography Disable ACF integration but that doesn’t help.
I can see that someone else has asked about manually disabling wp_Typography on some ACF fields but I don’t know whether this would apply in my case or what I need to do. Any help you can give would be really appreciated.
Thanks.
- The topic ‘Problems with ACF’ is closed to new replies.