Home › Forums › Add-ons › Options Page › Change Menu Position of Options Page › Reply To: Change Menu Position of Options Page
@elliot I think this could be simplified by adding a filter to the code so we can set the menu position when the menu item is registered:
$parent_page = add_menu_page( $this->settings['title'], $this->settings['menu'], $this->settings['capability'], $this->settings['slug'], array($this, 'html'), '', apply_filters('acf/options_page/menu_position', null));
The list of available positions is here:
http://codex.wordpress.org/Function_Reference/add_menu_page#Parameters
e.g. To position it after “Dashboard” you can set the position to 3:
add_filter('acf/options_page/menu_position', function() { return 3; });
What do you think?
Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.