The way you are doing this is not correct.
Two possibilities:
1) Create a Dashboard Widget to display the information
- For the Network Dashboard, but illustrates well: How to Display Network Post Count?
- Minimal widget:
add_action('wp_dashboard_setup', 'wpse_60096_dashboard_widget');
function wpse_60096_dashboard_widget() {
if( current_user_can( 'activate_plugins' ) )
wp_add_dashboard_widget(
'wpse_60096',
'Site Pages',
'wpse_60096_add_widget_content'
);
}
function wpse_60096_add_widget_content() {
$pages = get_pages();
foreach ( $pages as $page )
echo $page->post_title . '<br>';
}
2) Register an invisible submenu page
- Plugin – create a page without it appearing in the side menu
- Redirect the login to that page: How to create and link to administration page for a plugin?
Related Posts:
- How do I create a custom role capability?
- Prevent network activation of plugin
- Uninstall script for a plugin in Multisite
- Changing Plugin Load Order
- What is wrong with using add_option with Multisite instead of add_blog_option in a plugin
- How to Get a List of Sub Blogs without Using get_blog_list()?
- Cron firing my function everytime wp-admin is visited
- Error getting correct blog_id on MU from functions.php
- How do I make specific plugin functionality apply to different sites in a network?
- WordPress multisite apply different options over each site from same plugin
- Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
- Multisite, sharing content by URL
- Only allow plugin to be activated on root site of multisite
- How to use wp_set_password in a plugin?
- WordPress Media mime type filter problem 4.0
- What is the best way to overwrite /wp-admin/ms-delete-site.php
- Where should I store global data for my multi-site WordPress plugin?
- unable to stop loop when using wp_insert_post with publish_post hook
- Customize multisite site creation with user data
- Multisite plugin development and wp_enqueue_script
- Plugin Uninstall and Deactivate via Options Menu
- how to activate plugin network-wide, and save setting across sites
- Sharing a common set of image files for media library, across all sites within multisite
- What is difference between blog id and site id?
- How to create a Tools menu on the Network Admin dashboard from a plugin
- Override the default Add/Edit site forms of the Network Panel in custom plugin
- How to set “Site Address (URL)” programmatically on WP multisite?
- How to associate an existing user to a site in a multisite setup programmatically
- WordPress Multisite with Azure B2C redirect_urls after Login
- How To Change Post Author Default?
- Adding (blog-specific) links to “My Sites” admin page
- Plugin menu addition in multisite
- What should happen when a WordPress Plugin is activated across the network (Network Wide Activation)
- Multiple Plugin best practice in Multisite
- Selectively update themes in WordPress multisite
- how to invoke wordpress API from other existing PHP system
- WP Multisite login not working on one subsite. Possibly cookies/ history issue?
- register_activation_hook on multisite
- WordPress multisite,use same cookies across all website?
- WP: Search and replace in DB programmatically
- How to get current logged-in user details in multisite?
- add_action wp_ajax_ not loading in plugin file WP Network
- Clean way to initialize plugin in newly-added site when plugin has been network activated?
- How to share user data across multiple WordPress websites?
- Is there anything special required to make a plugin work in a multisite environment?
- How to edit wp-signup.php content using plugin
- How do I ensure I can loop through every enqueued script and CSS?
- Custom Plugin activation error in Multisite
- Replace “content-area” of themes 404 page with plugin?
- Multisite and the JSON REST API: How to?
- Testing Plugins for Multisite
- Same header/footer in Admin, across all network sites in multisite
- Change Admin menu placement using hooks
- Force remove parent theme CSS/JS and call them from Child theme
- Is there any plugin development framework
- Is wp-content/install.php a Drop-in?
- Handling results from data hooked into admin_post
- get_template_part from plugin
- How to create collections that are edited in admin?
- How can i list current author’s categories?
- Rest Api How to get results of child categories with one api call
- How to store accumulate multiple option values in a single array using Options_API
- Add Post and Comments menu no longer visible
- What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
- How do I obtain a list of categories assigned to the current post?
- Modify hard-coded conditionals for roles to custom roles
- Does wp_login only trigger before an user signs in into the admin panel?
- How to access noticeOperations from withNotices
- Thickbox doesn’t respect dimensions when used in admin [duplicate]
- How to make “upgrade safe” theme for a plugin?
- Function/Class to list categories with checkboxes
- Remove an action by extending class and replacing it
- making a plugin that moves other plugins wp_head actions to wp_footer
- Is hint for translator compulsory while internationalizing a string containing variables?
- Settings API: Setting default option via ‘get_option’ fails
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- How to redirect to login page when user not loggedin on a particular page
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- How do I validate extra pin field on my WordPress login form page?
- How to create a wordpress widget that dynamically changes according to the page
- Plugin to create Posts and Forums then choose category and parent forum
- Adding Permalink to Slides with ‘Simple Nivo Slider’ plugin?
- How to add a new taxonomy link to the admin menu
- Many Single Sites, One Plugin directory – adjust plugins_url()
- Include external po file for 3th party plugin to theme
- Adding the image selector/uploader to an admin back page
- setTimeout not working in jquery
- How do I show the HTML descrption in wordpress photo gallery for my individual gallery pages?
- Javascript scroll eventHandler only working when I’m logged in in WordPress
- redirect_to how to make it simply work with get parameter or similar?
- cancel place order proccess
- How I can give access to my custom plugin for editor roles user?
- WP: adding Javascript to specific woo commerce pages
- Calling dynamic_sidebar in plugin gives error
- How to add chunk of php, html, and sql code to variable an append to $content
- edit-tags.php in plugin admin menu hides when is the active page
- Best way to handle a form post in plugin
- How To Remove The Filter That Adds JetPack Related Content To Dom [closed]
- Fixing plugin for wpdb::prepare
- WooCommerce adds a newline symbol (\n) between email recipients