I’m not sure I understand your question correctly, but I give it a try…
<?php function remove_xprofile_links() {
global $current_user;
get_currentuserinfo();
$user_id = $current_user->ID;
$field = xprofile_get_field_data(3, $user_id);
$class="normal-profile";
if ($field == '{whatever}') {
$class="hidden-profile";
}
$html="<div class="" .$class . '">' . $field . '</div>';
echo $html;
?>
And in css you should have
.hidden-profile {display:none;}
Related Posts:
- Remove username in emails or swap username for email
- Help with adding pagination to custom wp_query
- Reordering Buddy Press profile navigation [closed]
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Making BuddyPress Activity Stream (Post Type) Featured Images Clickable [closed]
- How do I programmatically set a user as spam in BuddyPress? [closed]
- WordPress Stripping Colons?
- Buddypress update user avatar image via REST
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- Why BuddyPress fields not saving?
- Change homepage content if user is logged in – BuddyPress
- implementing a jQuery “click to expand” link in WordPress [closed]
- is user member of a group, show them categories [closed]
- Wp favorites posts by specific category? [closed]
- Display multi-select box choices in a bullet list [closed]
- Customize Buddypress adminbar [closed]
- Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts
- copy fields value to another field
- How do I visualize the author’s post from the front end?
- Change username link in admin bar
- how to get buddy press messages based on thready_id?
- Where is the php file of single member profile view (BuddyPress)
- Create a dynamic buddupress tab
- Get string from array and start loop [closed]
- 2 small questions: How to redirect to a created page & show that pages title in wp, bp
- Fatal error: Call to undefined function mysql_connect()
- Allow Editors to edit pending posts but not draft ones
- How Attackers write script into my php files?
- Fatal error: Call to undefined function plugin_dir_path()
- Switching wp_get_sites to get_sites
- How to get author ID when an author page is being viewed?
- Modify image while uploading
- How to remove html comment from source?
- Need help on WordPress and php
- Looking to exclude blog posts from category Previous/Next buttons
- How php content after the first and second paragraph
- Automatic Excerpt Not Working
- Best way to create a user programatically
- Can’t use get_results() in ajax query
- WordPress Ajax Data problem
- Remove all nav menu classes ( but keep useful ones… )
- Hiding a php element from mobile browsers
- How do I turn a shortcode into PHP code?
- WordPress get pagination on wpdb get_results
- Can I change the contents of a description meta tag generated by Yoast?
- How to filter/hook-into retrieve_password() to filter $_POST[‘user_login’]?
- Sorting Posts | Alphabetical Order
- How to return a foreach inside a shortcode
- Shortcode content output but not in correct place
- Storing Array from returned database query and using the array in a new query
- PHP variable = get_the_post_thumbnail_url outputting without slashes
- Automatically adding new post categories to menu
- Show prices with tax in Woocommerce Mini Cart [closed]
- WordPress ajax doesn’t display object method on jQuery .change() function
- Get post id in a function when edit/add a post
- WordPress every page is 404 not found including admin resources
- get author_name from queried post
- get_template_part based upon post’s category
- post thumbnail, conditions, else wont work
- Backend of the WordPress.com [closed]
- How to solve Woocommerce Memory Limit
- PHP in Edit Post link
- How to add drag and drop functionalities to a div inside option panel
- WordPress filter load_textdomain_mofile not working inside a child theme’s functions.php but works form inside a plugin
- How to unlink all posts from tracking same amount of views
- entire JS folder not loading in a WP theme
- Split shortcodes to array of shortcodes
- Set cookie for visitor
- Remove Post if Advanced Custom Field is checked to fix paging
- Using php inside javascript [closed]
- Simple seo-friendly custom $_GET url rewrite with htaccess
- Is there a way to create a “copy post” link?
- How to separate product payment and shipping payment in WooCommerce checkout? [closed]
- add role on WordPress in PHP on a second database
- WordPress single.php get_header not working
- Load more posts using AJAX based on posts inside WP_Query
- Undefined array key 0 wp-includes/capabilities.php on line 76
- Store GA Client ID in User DB
- Hide author from search results meta, still display date and categories
- Why does a header location on admin_head remove the query var I’m setting in the location?
- A WordPress Page to display custom database query results
- Get all woocommerce product names with price and show using core php
- Site doesnt work once PHP changed to 7.1
- How to detect and make links nofollow in author description
- admin uploads pre_get_posts not working as expected
- can’t delete a row from post_meta table
- Run PHP Results inside WP Shortcode
- Not able to get the exact URL of the file on server located in active wordpress theme
- Change taxonomy for categories
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- Show Nav Link To Users Signed In
- WordPress $GLOBALS and PHP $GLOBALS
- How to echo a different field if another field is empty?
- Remove the_content From Loop
- Display Sale Price Before Regular Price (WooCommerce)
- Load a Header in wordpress
- Trouble figuring out how to get my button to submit comment
- Using is home to get content [closed]
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- get_post_meta returns on side but it doesn’t return on bottom of admin page