Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Re: Global Custom Fields

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28424
    emma
    Participant

    Hi

    I was just implementing digwp’s brilliant solution for adding global custom fields into my WordPress CMS and was wondering how to make these fields appear under ‘Pages’ in the admin rather under ‘Settings’?

    This isn’t really an issue as everything works fine, but am just trying to keep things simple for my client.

    Thanks

    #72772
    Rob MacKay
    Participant

    yea you just have to change the bit that adds the settings…

    so this bit:

    Code:
    add_action(‘admin_menu’, ‘add_gcf_interface’);

    function add_gcf_interface() {
    add_options_page(‘Global Custom Fields’, ‘Global Custom Fields’, ‘8’, ‘functions’, ‘editglobalcustomfields’);
    }

    to something like this…

    Code:
    add_action(‘admin_menu’, ‘add_gcf_interface’);

    function add_gcf_interface() {

    add_menu_page(page_title, menu_title, capability, handle, [function], [icon_url]);
    add_submenu_page(parent, page_title, menu_title, capability required, file/handle, [function]);

    }

    http://codex.wordpress.org/Adding_Admin … _Functions
    http://codex.wordpress.org/Adding_Admin … #Sub-Menus

    hope that helps :)

    EDIT: sorry this adds a new menu section under your menu lol

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.