I use it to create fields for the easy adding/editing of content all over a website.
I have really only used a few of the field types (text, image, url, text area, wysiwyg and the repeater field)
I used to make a lot of widget based themes before I found ACF. 😛
Glad it worked. 🙂
This plugin is awesome and has changed my life. So I figure I should give back where I can be of assistance. 🙂
Try changing
echo the_field('contact_email');
to
printf('<a href="mailto:%s" title="Email Me" rel="nofollow">%1$s</a>', get_field("contact_email"));
Was that last reply supposed to be marked private? :-0
Tell me more, where is the email field located within your dashboard on a page? Or on a options page? Are you trying to get the field from the page where the field is located?
Post more of your code. I will take a look at it and see if I can sort it out. 🙂
Try this:
<?php $email = get_field('contact_email'); ?>
<td>
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo $email; ?>" rel="nofollow" title="Email me"><?php echo $email; ?></a><br />
</td>
🙂
Edit: My issue was with 5.0.8, after rolling it back 5.0.7 all seems to be fine again. 🙂
Assuming you want these fields to display on the actual single post pages of a given category the following should work.
<?php if ( in_category('cat-slug or ID') ) { ?>
// do stuff with the ACF fields
<?php } ?>
This would go in single.php
I was having this problem yesterday (using WP4 and the latest ACF Pro 5.0.8).
I fixed it by rolling back to the 5.0.7 and that seemed to fix it. Hope this offers you a temp solution that will allow you to move forward. 🙂
I’m having the same issue with an image field. I’m trying to replace the image with an edited version. The old one is there and displays in both the dashboard and on the site just fine.
Though if I remove it and try to add a different one it is not saved.
I read the other post linked to above but recreating the entire page is not an option (unless that is the only way) cause it is a long page with a lot of details.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.