Add site options UI in Multisite Sites > Infos page

I want to add meta fields for the sites in my network (such as a thumbnail and a category). I know how to do this using get/add/update_site_option, but I’m wondering where I could put the UI to manage those meta fields.

The best place would be in the Sites > Infos page, just after the site attributes, but I can’t find any hook to hang on. I can add those fields in the “Settings” tab of the same screen, but one has to scroll down a lot to find it, and it gets mixed with advanced settings.

Read More

Any suggestion ?

Related posts

3 comments

  1. I finally found a way to add more lines to the Sites > Infos table :
    My own option in the Sites/> Infos table”></p>
<p>It’s a little bit ugly, but it works. I simply use the action <code>admin_footer</code> to add a bunch of HTML code at the end of the page, and then use jQuery to move it to the right place.</p>
<pre><code>add_action('admin_footer', 'user16975_custom_options');
function user16975_custom_options(){
    global $pagenow;
    if( 'site-info.php' == $pagenow ) {
        ?><table><tr id=

    The good part is that as soon as the hook will be available, I can use it without big changes in my code.

  2. First off all – I agreed, there is no specific hooks in this part of the core that allows to create custom setting fields there. But anyway it is possible.

    WordPress has network_edit_site_nav_links filter hook which allows to create your custom tab.

    But no hooks for the page for the new tab, but it is not a problem anyway because you can achieve the result with simple options page and a little CSS code.

    In this tutorial everything is described by steps https://rudrastyh.com/wordpress-multisite/custom-tabs-with-options.html (I think it is no reason to copy all the code from there to this thread).

Comments are closed.