1

I want to add custom attributes to a WP blog (not page, or post!), which are editable as checkboxes from the 'Edit site' page, as on the following picture: Wordpress Site attributes

The current values that are selectable are Public, Archived, Spam, Mature, Deleted. Can I add some custom ones? Is there any hook/function which I could use for this?

I haven't found anything regarding these attributes in the documentation. So far I only encountered with solutions that are valid for posts, or pages (public, draft, private); but not for the sites/blogs themselves.

  • 1
    Does it have to be in this exact location? Usually you would create a custom options page, if you need to implement some sort of additional page settings, https://codex.wordpress.org/Creating_Options_Pages – CBroe Jun 27 '23 at 08:04
  • @CBroe yeah I would like to be so, since this way I could edit this custom attribute from the network dashboard, and I wouldn't need to get into each site's dashboard (out login system handles login sessions separately, so everytime I want to get into a dashboard, I have to login again and again.. Modifying this is not an option sadly) – BorsodiGerii Jun 27 '23 at 11:48
  • You can create an options page on the network level as well, https://rudrastyh.com/wordpress-multisite/options-pages.html – CBroe Jun 27 '23 at 12:05
  • @CBroe That would be great, if it would be unique for every site in the multisite (correct me if I'm wrong here). The attribute I need has to be uniquely editable for every site, and what you linked is about creating some options, that are the options of the multisite itself. (In my attached image above, the attributes "Public, Spam, Mature..." are on the scope for every site separately, and are editable from the network admin "All sites" dashboard. My goal is to get something similar without the need of coding a separate plugin for it, with built in functionalities). – BorsodiGerii Jun 27 '23 at 12:55
  • 1
    You could create an option _for_ each site, all shown on that _one_ multipage-level options page. _"My goal is to get something similar without the need of coding a separate plugin for it, with built in functionalities"_ - I don't think modifying the "edit site" page the way you want, will work without custom coding either. – CBroe Jun 27 '23 at 13:03
  • @CBroe Thank you for your help, I will stay with the options for each site then (might just code a plugin for it then...). Since then I looked into the source files, and these attributes seems to be hardcoded into the **WP_Site** class itself, and they don't seem editable. Anyways, thank you for your time! – BorsodiGerii Jun 28 '23 at 06:14

0 Answers0