• Resolved redkite

    (@redkite)


    If you look at the URL and go all the way to the end of the vet listings, all vets (82 pages of them) show in the front end. But in the dashboard the listings stop around Schnyder, though there are about 250 more vets between that name and Zukiewicz.

    https://snipboard.io/lRXpSn.jpg

    Also in the dashboard, it shows 7 drafts but the page is empty:

    https://snipboard.io/IWqyR6.jpg

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you doing any customizations around and with the pre_get_posts hook? Cause that hook runs in the WordPress dashboard as well, and could be inadvertently affecting things here.

    Whenever using that hook, I make it a point to return early if is_admin() returns true, which is checking for the WordPress admin area, not if the user is an administrator.

    Thread Starter redkite

    (@redkite)

    Yes, I am doing pre_get_posts (I built the theme around 2013, I had to go back and check).

    I added the ! is_admin() and now the 7 drafts are there. The posts are in a weird order now but it does appear that they’re all showing in the dashboard.

    Thanks – good catch! I’ll check with the client to confirm this is okay now.

    Thread Starter redkite

    (@redkite)

    Is there a way to add the custom fields for first name/last name to the custom post listings, like a screen option, in the dashboard? Now that I’ve made that change they show by title (first + last name), which is different than what they were doing before.

    Thread Starter redkite

    (@redkite)

    Never mind – got that sorted out too. Thank you!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Before you figured it out on your own, my answer was going to be “yes, I have to assume there is, but it’s not something CPTUI handles” 😀

    Glad to hear you got things sorted out. That pre_get_posts hook is a tricky one at times.

    Thread Starter redkite

    (@redkite)

    Thanks, I appreciate the fast response!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Custom posts missing in dashboard’ is closed to new replies.