Looks like it’s an issue with my theme. I’ll create a new ticket. Is there any way I can privately provide admin without giving the credentials on the forum for anyone to see?
Thanks for your help so far! Tell you what, here’s a quick screencast showing you. I set it to 2; the /register
is the page of 2.
http://cloud.believelabs.com/3V0A1J3l0q2N/Screen%20Recording%202016-08-03%20at%2023.07.gif
Also, here’s a screenshot from the Database table.
http://cloud.believelabs.com/2p333R1s3o0R/Image%202016-08-03%20at%2023.08.37.png
I should say, the idea is to have this data / loop _only_ show up on the “LOCATION” page (the page with Id of 127
) and as it stands, it’s showing up on both pages.
@acf-support thanks for the attempt but that wasn’t it. I’ve tried a few different combinations.
So, here’s more details:
/register
is a page with ID of 2
/events
is a page with an ID of 127
.
The field in the database shows up as:
a:1:{i:0;s:3:"127";}
Isn’t it because the LIKE
query finds the ID of 2
(as well as the ID of 127
) are found in both spots?
PS.
What I ended up doing, which is horrible and terrible for performance, is allow the query to run, and then in my loop, check *again* for the value:
if (in_array($ID, get_field('location'))) {
…and basically only run / output content in this if statement. This means it’s actually doing the query, retrieving the post, and then doing some junk crap to prevent it from showing up if we don’t past the in_array
test.
It works, but not good. Is there a better way to do this?
So, we upgraded from PHP 5.3 to 5.4.XX and I think this is fixed. Would have been good to know ahead of time! Is this a confirmed problem? I couldn’t find anything on the website confirming you need to run PHP 5.4+.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.