• Hi, I’m a software and website developer, new to WordPress and am only beginning to familiarize myself with the API.

    I’m creating a plugin that adds a column to the user list on the users.php page. I’d like to add a checkbox to the “Screen Options” drop down so the user can choose to hide/show the column. I’ve tried adding the javascript to footer of the admin page, but it seems the WordPress core is overriding it. Is there some hook or function that allows me to do this?

    Thanks

    Cher

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pluginqueen

    (@pluginqueen)

    Thanks for the link ptadunbar. I found that site earlier in my search, but, I had a difficult time understanding his English and didn’t think it was quite what I was looking for. If I’d been working with wordpress longer than a week, maybe it would make more sense.

    Am I to understand that the only way to include a checkbox in the Screen Options is if I create a meta box first? What if I don’t want to hide or show a metabox? Ideally, I’d like to execute a js function when the user clicks the checkbox in the Screen Options without being limited to a metabox.

    A dirty solution might be to create dummy metabox and then assign the onclick event to its corresponding checkbox. I guess I could do that, unless you have any other ideas?

    Thanks again,

    Cher

    Thread Starter pluginqueen

    (@pluginqueen)

    Also: I’m finding a lot of info that says meta_boxes are only available for link, post and pages. I’m wanting to do it for the users.php page. Is there something I’m missing?

    Cher

    Well in order for the screen layout columns to work, you have to have metaboxes enabled. As far as changing the screen columns for native admin pages in WP, some of them are already preset to a max of 2 or 1 so changing that requires a bit of hacking.

    That link I posted above works as expected so try editing that one until you achieve your desired effect.

    pluginqueen did you ever complete the plugin you were working on? Id be very interested in trying it out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding items to “Screen Options”’ is closed to new replies.