• Resolved ellbristow

    (@ellbristow)


    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!

Viewing 1 replies (of 1 total)
  • Thread Starter ellbristow

    (@ellbristow)

    Fixed it! There was nothign wrong with my code! The issue was with WPML.

    Because the imported posts didn’t contain the meta data for the WPML language, they weren’t displayed. Disabling then re-enabling WPML fixed the issue!

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post exists but doesn't appear’ is closed to new replies.