• This is for the Post Carousel widget. Unknown to me whether other post selection widgets might have similar issues.

    On a site supporting multiple post types.
    In the “selection of Post Type” control on the admin screen, multiple post types are then selected.

    As you select individual post types, the callback to count posts uses the selection correctly. The counter (red blob number) updates to show the number of posts as one add in each post-type. You might end up with say 15 posts in total..

    When you then finally click “Save” on the widget configuration…
    The currently configured selections are then supposed to be posted back to to the “update_callback()” routine. Including of course the selection of multiple post_types.

    BUT.. Looking at the $_POST data being sent back (and in a debugger at the actual data picked out by “update_callback”), 100% consistent only the last post-type in the selection is passed back and saved. Which of course means that when the widget shows live on the site, it includes only posts of that single post-type. Whatever post-type was last selected (or was last in the selection list) on the admin screen.

    So, after clicking Save, the “red blob number” then magically goes down from its original higher number, to the found_posts number for that single post type.

  • The topic ‘Selection of post types not saved correctly for Post Carousel widget’ is closed to new replies.