Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4230532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T01:52:33+00:00 2026-05-21T01:52:33+00:00

I have modified the buddypress admin bar by creating the following plugin which adds

  • 0

I have modified the buddypress admin bar by creating the following plugin which adds a simple text link to the bar:

function bp_adminbar_currentsite_menu() {

global $bp;
?>
<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);

However, I do NOT want the above link to be shown when logged into the wordpress admin backend (so for example when an admin is editing a post). I thought about just doing a php_self check to see if it contained “/wp-admin/” but figured that there has to be a more elegant wordpress/buddypress hook here.

How can I get the above code to only show when you are viewing a normal blog page, NOT in the admin area?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T01:52:33+00:00Added an answer on May 21, 2026 at 1:52 am

    using is_admin() is the answer. It is a wordpress function that checks to see if you are looking at admin pages or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have modified bx.slider to have the thumbnails underneath text content with an image
I have modified a file, named index.html then I run git checkout . which
//UPDATE// I found some code to do paging which I have modified to work
I have a gridview and have modified it following this article: http://msdn.microsoft.com/en-us/library/aa992036.aspx#Y3473 to allow
I have a script which takes in several arguments. Now, I have modified the
I have modified a SharePoint visual studio workflow which works as per requirement on
I have modified a function to meet my need. This is what I have
I have modified the standard info window to include self-defined tab-bar at the top.
I have modified the Nerd Dinner application to allow editing of child records by
I have modified my MOSS 2007 configuration to query a given target AD successfully.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.