How to edit buddypress templates? [closed]

BuddyPress themes are WordPress themes, plus extra templates. I encourage you to use the BuddyPress Template Pack plugin to enable these extra templates: http://wordpress.org/extend/plugins/bp-template-pack/ Here’s a bit of background on how to build a BP-compatible child theme: http://codex.buddypress.org/theme-development/bp-template-pack-walkthrough-level-easy-2/ This link actually uses TwentyTen as an example: http://codex.buddypress.org/theme-development/theme-dev-bp-template-pack-walkthrough-twenty-ten-bp-1-5/

How to remove parent section from attachment URL?

The attachment URL is created in wp-includes/link-template.php in function get_attachment_link(). And there is a filter for you, passing the WordPress URL and the post id for the attachment. You can hook into that filter and return the URL you need: add_filter( ‘attachment_link’, ‘wpse_56619_unprettify_attachment_url’, 10, 2 ); function wpse_56619_unprettify_attachment_url( $link, $id ) { return home_url( “/?attachment_id=$id” … Read more

How to show customized activity for custom post types in buddypress activity loop?

You can filter on the action before it is saved by using add_filter on ‘bp_blogs_activity_new_comment_action’ as shown in bp-blogs-functions.php -> bp_blogs_record_comment() Or you can filter before the action is displayed by using add_filter on ‘bp_get_activity_action’ Probably better to do the former because you can easily check post->post_type to see if it is ‘business’. This shows … Read more

How to add php to custom link in the nav menu? [closed]

You could do something like this: <?php if ( is_user_logged_in() ) { wp_nav_menu( array( ‘theme_location’ => ‘logged-in-menu’ ) ); } else { wp_nav_menu( array( ‘theme_location’ => ‘logged-out-menu’ ) ); } ?> EDIT: Here is another try, same theory but different execution: if ( is_user_logged_in() ) { // Filter wp_nav_menu() to add additional links and other … Read more

Buddypress Add unserialized Profile Fields in Members Loop [closed]

I believe xprofile_get_field_data is unserializing the data for you, but it is still in an array. xprofile_get_field_data can return an array or a comma-separated string. xprofile_get_field_data( $field, $user_id = 0, $multi_format=”array” ) @param string $multi_format How should array data be returned? ‘comma’ if you want a comma-separated string ‘array’ if you want an array

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)