• Resolved nils235

    (@nils235)


    I try to restrict the view in admin for my post type to a selected category, using the navigation elements on top of the overview page:

    Starting here:
    /wp-admin/edit.php?post_type=spots

    After selecting a category and hitting “Go” I get to:
    /wp-admin/edit.php?s&post_status=all&post_type=spots&action=-1&m=0&cat=30&filter_action=Auswahl+einschränken&paged=1&action2=-1

    I don’t get any results, although there actually are some posts with the selected category.

    Any ideas?

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

    (@tw2113)

    The BenchPresser

    Not really anything that CPTUI handles or modifies. That said, all of the parts of that URL that have action in them, like action=-1 and similar, as well as that m=0 are peculiar. Their presence would also have a potential effect on the results.

    Perhaps something simple like this would get you the results you’re expecting?

    /wp-admin/edit.php?s&post_status=all&post_type=spots&cat=30&paged=1

    The next question would be where are those extra parts coming from.

    Thread Starter nils235

    (@nils235)

    Thanks for your answer, unfortunately that doesn’t help either.

    Even if I click on a category in the entries-part of the overview-page, I get zero results:
    /wp-admin/edit.php?post_type=spots&category_name=examplecat

    edit: I actually get the extra parameters on other sites, too, so this can’t be it (although I didn’t check what they actually do)

    It looks to the (semi-)laymans eyes as if choosing a category actually overrides the content type. Can anyone replicate / confirm that?

    • This reply was modified 7 years, 3 months ago by nils235.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Something else is probably interfering with your queries, is my best guess at the moment. Especially if you’ve done anything with the pre_get_posts hook. I wasn’t able to recreate cases of no posts found with something as simple as /wp-admin/edit.php?category_name=uncategorized&post_type=customers. Once I got a post assigned the “uncategorized” category, it showed up like expected.

    Thread Starter nils235

    (@nils235)

    oh damn, your comment made me desperately deactivating everything to see what’s happening. Turned out it was my theme. Stupid me. :-O

    Thanks for the extra-trigger, (really) sorry for wasting your time! :-/

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    No worries, and no time wasted. Sometimes we just need an extra set of eyes on things 🙂

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

The topic ‘restrict view on taxonomy admin page’ is closed to new replies.