maybe give us some code you use?
i got further problems with this project and ended up creating custom posts for every user, which made it much easier.
I dont really understand what it does, but this seems to solve the issue 😉
Thanks Elliot, You’re awesome!
Am i right that it kind of marks the field as a “the_content” output for plugins i installed?
I’m not quite sure what you want to achieve.
What i can say is, that your if statement needs an expression of the type boolean, which your field probably isn’t. (read this)
The problem is that i’m not only getting image URLs, i’ve got a field with a WYSIWYG editor which gives me all kinds of content, so i can’t hardcode it in my template :/
@sdawson26 the tag was the right one the issue was the conversion of the string, as elliot pointed out.
@elliot this was exactly what solved the issue for me. thaks!
I should really try to lern PHP – at least the very basics like these datatypes…
I really appreciate the support you guys give here! It’s awesome.
And @elliot: the plugin and the page here is just plain awesome! Thanks!
I tried
$original_query = $wp_query;
$tagstr = get_field('usertag');
echo $tagstr;
$wp_query = null;
$wp_query = new WP_Query( 'tag=$tagstr')
but it does nothing. (i echo’d $tagstr to check whether it’s the right value and it seems to be correct).
Thank you!
This was the solution i’ve come up with now:
$image1 = get_field('profilbild', $user);
$image2 = get_field('funbild', $user);
$name = get_field('nickname', $user);
echo '<li><div class="image_wrapper"><img class="profile1" src="';
echo $image1['url'];
echo '"/></div><img class="profile2 hoverShow" src="';
echo $image2['url'];
echo '"/><div class="imageOverlay"><p>';
echo "$name";
echo '</p></div></li>';
Maybe this helps anyone reading this later 😉
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.