WordPress.org

Forums

postbox On Multiple [views] in a single [page] (2 posts)

  1. WebTechGlobal
    Member
    Posted 1 year ago #

    If you look at the TablePress plugin which makes use of postboxes. You will see that the menu of tabs is the same menu as in the WordPress admin menu. I want to improve on this and I'm almost done but I need a little help now please.

    My CSV 2 POST plugin has a menu of tabs per page. So I have five pages and on each page is any number of tabs/views. Each view currently has it's own post boxes, they can be moved, docked and even hidden as Screen Options are in use.

    But even though the ID's of each postbox are unique (checked source many times). There is always a box or sometimes two that seem to share settings between views. Or settings are being overwritten when the box on one view is moved causing the box on the other view to go to default place.

    The Screen Options tab will cause the boxes on view A to be displayed if all the boxes on view B are hidden. Again ID values are all unique so I'm just stuck.

    There are 2 class and many methods involved so I'm hoping someone can just tell me if WordPress has limitations and these post boxes can only be used on a single page view or is there a common value that I might be missing causing this?

    Thanks for any help on this. If I can get it working it will make any plugin I create a lot more enjoyable to use and far more integrated with WP.

  2. WebTechGlobal
    Member
    Posted 1 year ago #

    I think I might be able to answer my own question. The answer is in user meta. Each user (me for now) would need a group of settings per view. In a small plugin and the WP dashboard that is not a lot. But in CSV 2 POST with over 30 views that requires a fair bit more to be added to user meta.

    Here are the values I found which must be getting shared from one view to another has "betatesting" is being used instead of something more unique...

    'meta-box-order_csv-2-post_page_csv2post_betatesting' =>
      'screen_layout_csv-2-post_page_csv2post_betatesting'
      'closedpostboxes_csv-2-post_page_csv2post_betatesting'
      'metaboxhidden_csv-2-post_page_csv2post_betatesting'

    The question now is can "meta-box-order_csv-2-post_page_csv2post_betatesting" be customized per view rather than per page?

Topic Closed

This topic has been closed to new replies.

About this Topic