How do i put in user id in a banner
You can use get_current_user_id() – if a user is not logged in, the value will be 0: <a href=”http://example.com/uid=<?php echo get_current_user_id() ?>”>…</a>
You can use get_current_user_id() – if a user is not logged in, the value will be 0: <a href=”http://example.com/uid=<?php echo get_current_user_id() ?>”>…</a>
function bp_registrations_today($activated = false) { global $wpdb; $query = “SELECT COUNT(ID) FROM {$wpdb->prefix}users WHERE DATE(user_registered) = CURDATE()”; if ( $activated ) { $query .= ” AND user_status = 0″; } return $wpdb->get_var($query); } To get the number of users registered today, call the function as echo bp_registrations_today(); To get the number of users registered today … Read more
you can use something like this /** * Get City state from zipcode */ function rtp_get_city_state($location) { $details_url=”http://maps.google.com/maps/api/geocode/json?address=”.$location.’&sensor=false’; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $details_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = json_decode(curl_exec($ch), true); if ($response[‘status’] != ‘OK’) { return null; } print_r($response); }
Your answer is on the codex page link in your question. // Get the member type of user 5412. $member_type = bp_get_member_type( 5412 ); So you could do something like this: $member_type = bp_get_member_type( get_current_user_id() ); if ( $member_type == ‘dog’ ) echo ‘Bark’;
Yes, yes you can You will need to hook into the add_attachment action, though there are others that may be more appropriate. Then you grab the list of administrators and send an email. Here is a sample plugin I created for you: <?php /* Plugin Name: Notify on Attachment Creation Plugin URI: http://www.tomjn.com Description: Send … Read more
Based on this statement… note: i want their profile called MY ACCOUNT to be on the nav bar … and other parts of your description, I think what you want is not really to have pages that are “only members that are logged in”. Despite the title of the questions, it sounds like you want … Read more
Big Question. So, first, to keep the galleries separate, it would be good to give them their own custom post type. We’ll be checking for this later… <?php add_action( ‘init’, ‘wpse32840_register_post_type’ ); function wpse32840_register_post_type() { register_post_type( ‘client_gallery’, array( ‘label’ => __( ‘Client Galleries’ ), // probably needs better lables ‘public’ => true, // allow people … Read more
Conditional menu for registerd users/guests (Genesis framework)
Addin plugin custom post type to members plugin
Add additional ‘description’ field for defined roles / role metadata?