Using Advanced custom fields with Wordpress and everything works on local and fails miserably on production

StackOverflow https://stackoverflow.com/questions/21972557

Question

This is the thread I opened on ACF's website.

This is the website in question

But basically my local version of the site works without a hitch but when I pushed it live it fails.

I haven't heard from the ACF guru in a couple days but, picking up where we left off, the closest I can figure the problem is has something to do with get_the_id() returning int(1078) instead of int(1) like it should being that the database is brand new and the "Hello World" is the first and only post.

What's also weird is the title is correct but and half of the content exists but nothing I've done can get it to display.

Has anyone ever seen anything like this before? Is there a good reason why get_the_id() returns the right post id on my local installation?

Was it helpful?

Solution

You could try to make a copy of your local database and replace every localhost with the correct site url. After that execute this SQL in your production environment. Probably your database is messed up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top