You ca use the conditional tag is_admin()
to check if you are on the front-end or back-end like this:
function bp_adminbar_currentsite_menu() {
global $bp;
if (!is_admin()){
?>
<li>
<!-- Insert your link url or relative url, and your link text below -->
<a href="http://EXAMPLE.COM">EXAMPLE LINK TEXT</a>
</li>
<?php
}
}
// Call The Function Above
add_action('bp_adminbar_menus', 'bp_adminbar_currentsite_menu', 999);
Related Posts:
- How to put placeholder text in the main post input area?
- maintaing consistent layout wordpress dashboard
- Admin – Handle data before creating or updating a post, page or custom post
- How can I replace content in the WP Admin area before an admin page is rendered?
- Disable Auto-Expanding Menu in WordPress Admin Menus
- Best practice for plugin: always detect admin-ajax call?
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- How can I add an image upload field directly to a custom write panel?
- Creating a table in the admin-style?
- How to store username and password to API in wordpress option DB?
- body_class hook for admin pages
- Is there a limit on making calls to WordPress.org API’s?
- Export data as CSV in back end with proper HTTP headers
- What is the real intention for admin-post.php?
- Is There a WordPress Hook to Filter the Edit Posts View?
- Admin config screen without menu
- Make Categories and Tags required in admin
- How do you create a custom edit.php / edit pages page
- why don’t I get error messages in admin when developing?
- WP_Error handles errors, but how can I show success with a message?
- Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
- URLs of plugin resources?
- Problems with removing admin bar
- Build dynamic page from cURL (HTML page) response with plugin
- wp_enqueue_style built in styles
- How get Themes list via REST api?
- What does $_registered_pages do?
- Should I ask my Twitter plugin users to create their own Twitter App and API Keys to use my plugin?
- Add tab to profile.php wordpress plugin development
- add_filter : Passing an array instead of the callback function?
- Can I individually style items in the backend widget list?
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- add a class when login
- Using the default wordpress uploader inside plugin
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Replacing Scripts in Admin Load_Scripts
- Buddypress function and global $bp question
- Add column and post filter for a custom post type field on the edit.php page
- Is there no admin ui guide for 4.x?
- Correct check for any admin page with editor
- All Users > User List > Update User Meta Field Inline
- On cliking add new post redirect user to a custom page first
- Change the look and feel of admin pages
- Admin Plugin POST to another file within the plugin
- Prevent third party plugin’s admin page access based on user type
- Password field is empty when using wp_signon();
- woocommerce_checkout_order_processed hook executing function twice
- Using ReactJS in the WordPress admin for plugin development
- template_redirect or admin-ajax.php?
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- How to load library scripts in admin from plugins in noConflict wrapper?
- Show error message after exception handled
- Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
- How to Move the Comments Bubble to the Right Side of the Toolbar
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
- Displaying “One Time” Notification in Plugins
- Encoding Method for URLs?
- Data not insert and update through ajax and jQuery in admin page?
- Is it possible to load the css just on my plugin admin page?
- AJAX button with success callback. (Titan Framework)
- jQuery UI tab does not work in the plugin page
- Submit form to a different PHP file in the same plugin folder
- Remove Meta-boxes (Yoast SEO plugin) [duplicate]
- Proper way to create an administration page without adding it to the menu
- using admin functions on frontend
- How to add text editor in plugin menu?
- Get cat parameter from admin-ajax
- How to make an admin plugin menu page go full screen?
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- Add New Button in Admin Panel
- Adding Amchart Interface to WordPress API
- Generate Static Page to Show Search Results/Detail for API
- Buddy Press restrict the capability to edit users
- How to create plugin settings page for each admin user?
- Custom premium registration form and profile page for a WordPress Web Application
- Multisite and the JSON REST API: How to?
- How to enable or disable check boxes in custom post type
- How do WordPress plugins work with oAuth2 APIs?
- How to display properly exception or echo string after posting in plugin?
- API WordPress is Limited? Return False
- How to return a blank page
- Same header/footer in Admin, across all network sites in multisite
- Get (eventual) permalink from post within Edit Post in Admin panel
- Adding admin for specific users
- Tie specific functions to options-update for limiting API requests
- How do I control the list of Pages an author can see?
- Is there a way to tell if a shorcode’s handler is being run before or after the content formatting filter?
- How to add conent (text) to Add New pages form of admin in WordPress
- Developing a plugin, ran it through P3 Profiler, shows up slow, but I don’t know why
- add_rewrite_rule not working
- Post data in wp-admin to external database
- WordPress multiple user roles accessing on their information on one site?
- loop and in admin header problem
- How do I query posts and have their related taxonomies returned in the results?
- Loading jQuery library from WordPress admin
- How to update WordPress Plugins in your own maintance application?
- External api call using wordpress
- How to prepend a header section to all pages related to my WordPress Plugin