Support » Developing with WordPress » Custom post type posts not showing in list

  • Resolved davecan

    (@davecan)


    I’ve added register_post_type(‘events’, $args) to my theme’s functions file based on this snippet (and after a lot of other web page explanations): https://generatewp.com/post-type/

    After configuration, the custom post type showed up in admin and I created a few test posts, but when I go back to the posts list it says 2 published but there’s no posts on the list (yes I refreshed and hard-refreshed and cleared cache and cookies and wiped my PC and cleaned the bathroom and vacuumed the floors).

    Nothing I change in the PHP or admin fixes it, and I’ve been digging around the SQL tables trying to find how those are populated but I’m not finding anything yet.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi davecan,
    Can you please share the $args part of your custom post type?

    Thread Starter davecan

    (@davecan)

    I couldn’t figure out why it was showing blank but I found some alternate code on StackOverflow that worked with some tweaks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom post type posts not showing in list’ is closed to new replies.