My situation is as followed. I created a custom post type, which is called backgrounds. Each background has a designer-name and of course featured image. That works like a charm.
The thingy I wanna do now is to make it possible to set a background post, as the current background. But is there any possibility to check if any other background is set to that? I mean I will create a custom field, a checkbox where it says, set as current background. When I post it, it will check which other background has it true, set it to false. Like a unique value, which only exists for one post only.
Hope you guys understand me. Having some trouble with my English right now.
But my problem is, that get_post_meta wont work immediately, it seems that calls the database entry too early… Like before it’s posted into database… Cause when I update the post 2 times, the correct value is inside, otherwise the value I had before is in there…
Anyone know how to get that work properly?