Custom Post exists but doesn't appear
-
I am writing a custom post importer for a real estate website that imports properties from other agents via XML.
The importer seems to work absolutely fine through the whole import process, no errors reported etc… however when the import completes the custom post is not appearing in the custom post list.
What is odd is that the post definitely does exist. If you look in the Media library, the images that were imported and attached to the post appear as expected, and state that they are attached to the right post. You can click the post in the “Uploaded To” column to open the editor and the post appears correctly and can be edited. What’s even weirder is, once you have done this, the post then appears in the custom post list, even if you never click “Update” to resave it!
An excerpt of the relevant code can be viewed at https://codeshare.io/0Kx44 for 14 days. The important part (where the post is created) starts at line 159.
Any help (or explanation) woudl be very much appreciated!
- The topic ‘Custom Post exists but doesn't appear’ is closed to new replies.