Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 7,076 through 7,100 (of 32,540 total)
  • Author
    Search Results
  • #242807
    messina82
    Participant

    Thank you very much all. I’ve been able to add the profile image to users logged in but for some reason it strips all the code around it. The avatar as well as the other links are part of a unordered list. This is the code i’m working with:

    // Filter wp_nav_menu() to add profile link in a specific custom menu
    function member_links($menu, $args) {
        if( is_user_logged_in() && $args->theme_location == 'membermenu' ){
        	$profilelink = '<li class="bp-menu bp-activity-nav menu-item menu-item-type-custom menu-item-object-custom"><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('My Profile') . '</a></li>';
            $profileimage = '<li class="bp-menu bp-activity-nav menu-item menu-item-type-custom menu-item-object-custom"><a href="' . bp_loggedin_user_domain( '/' ) . '">' . bp_loggedin_user_avatar() . '</a></li>';
            $menu = $profilelink . $profileimage . $menu;
        }
        else {
    
         if( !is_user_logged_in() && $args->theme_location == 'membermenu' ){
            $profilelink = '<li class="bp-menu bp-activity-nav menu-item menu-item-type-custom menu-item-object-custom"><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('Test') . '</a></li>';
            $menu = $profilelink . $menu;
        }
    }
        return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'member_links', 10, 2 );
    
    //Member Menu
    function buddy_navigation () {
      echo '<div class="member-menu-container">';
    	$args = array(
    			'theme_location'  => 'membermenu',
    			'container'       => 'nav',
    			'container_class' => 'wrap',
    			'menu_class'      => 'menu genesis-nav-menu member-menu',
    			'depth'           => 1,
    		);
    	wp_nav_menu( $args );
      echo '</div>';
    }
    
    add_theme_support ( 'genesis-menus' , array ( 'primary' => 'Primary Navigation Menu' , 'secondary' => 'Secondary Navigation Menu' ,'membermenu' => 'Member Menu' ) );
    
    add_shortcode('buddynav', 'buddy_navigation');
    

    Essentially i’m creating the buddy navigation, outputting it as a shortcode and throwing it in a widget followed by appending the additional links above.

    Any idea what’s going on here? Also if i were to integrate specific admin links, would I add another else / if statement targeted to is_admin?

    Thanks for the help!

    #242804
    Henry Wright
    Moderator

    You can put all of your custom BP snippets in your theme’s functions.php. Alternatively, if you plan to swap themes regularly, they can go into your bp-custom.php file (if you don’t have one of these already, you can create one).

    #242772
    Henry Wright
    Moderator

    It’s unusual that BuddyPress isn’t working with a theme due to the Theme Compatibility that was introduced in 1.7. I suggest you open a support request with the theme author asking them to investigate why the theme isn’t working properly with BP. Most theme authors are happy to make their themes BP-compatible so hopefully you’ll get a response.

    #242753

    May have to check w3c, code academy, and maybe even the theme’s support website as I don’t see any percentage when I enter #444 or whatever. What did popup though was:

    #content .entry-content h1 { font-size: 32px; }
    #content .entry-content h2 { font-size: 28px; }
    #content .entry-content h3 { font-size: 24px; }
    #content .entry-content h4 { font-size: 20px; }
    #content .entry-content h5 { font-size: 16px; }
    #content .entry-content h6 { font-size: 12px; }

    .entry-content blockquote {
    display: table;
    padding: 20px;
    margin: 0 auto;
    width: auto;
    font-style: italic;
    clear: both;
    float: none;
    position: relative;
    font-weight: bold;
    }

    .entry-content blockquote:before {
    position: absolute;
    left: 0;
    top: 0;
    content: ‘\e80f’;
    font-family: ‘elusive’;
    font-size: 1em;
    color: rgba(0,0,0,.05);
    z-index: 0;
    }

    .entry-content blockquote:after {
    position: absolute;
    right: 0;
    bottom: 0;
    content: ‘\e80f’;

    Does quote box count as the description? If so I should be able to just change the digits to all 0’s (just assuming). The only other time that .entry-content h shows up is when it identifies about tables and there is no color options.

    #242748
    shanebp
    Moderator

    a little incontinence

    It might be a little inconvenient, but nothing that will require a diaper.

    It’s easy to add modified versions of these 2 files to a buddypress folder in your theme – then change or add a css class to the description.
    bp-templates\bp-legacy\buddypress\groups\groups-loop.php
    bp-templates\bp-legacy\buddypress\groups\single\group-header.php

    Info re template overloading:

    Theme Compatibility & Template Files

    djsteveb
    Participant

    @kawaiikawaii – you did not mention if you tried this with ALL the other plugins disabled, and if you tried to get same results with default 2014 theme.

    #242746
    djsteveb
    Participant

    @swansonchristopherm – with firefox, and I think it’s similar with chrome and others.. when you right click on your group description then click “inspect element” or something like that, it should bring up a list of rules that are affecting the color, font, etc for group description.

    find that (most likely) in your style.css under appearance (themes), edit.

    there are some easy to use wordpress plugins that will create a child theme for you with a click.. but it’s not 100% for such a small change – easy to get back in and change it back when cryout pushes an update.

    djsteveb
    Participant

    @kawaiikawaii – does it work if you disable
    buddypress-social-icons
    mycred

    and any other plugins, along with switching to 2014 theme?

    Is this happening when using a desktop computer or a mobile device?

    My users have been telling me that rtmedia image uploads no longer make it to the activity stream or profiles when they try using an android device (tablet or cell) – this has been reported my several others at the rtcamp’s no-support-community-forums ( http://community.rtcamp.com/t/cant-upload-photos-using-android-devices/4892/8 )

    At this point I don’t know what the problem is – is it wp’s new security update thing that broke a lot of things?

    I’m still searching for answers – but this is a major problem and a reason I have been suggesting for years that BP has media uploads as part of core (most recently here – https://buddypress.org/support/topic/rtmedia-export-script-attachments-api/ )- and hopefully hooks into the new bp-attachments thing.

    Now if someone can code an export / import conversion to pull all the info from rtmedia into basic structured info that any theme or other plugin can call / style, etc – I’d love to axe the ridiculously bloated rtmedia BS.

    #242737
    Henry Wright
    Moderator

    Are you using any plugins? Also, which theme are you using?

    #242729
    Jld142
    Participant

    This is my current code:

    <?php
    
    /* Link parent CSS file */
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    /* Count number of user notifications */
    function cg_current_user_notification_count() {
        $notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object');
        $count = !empty($notifications) ? count($notifications) : 0;
     
        echo $count;
    }
    
    /* Remove register BuddyPress Widget creator */
    function remove_bp_core_register_widgets() {
        remove_action(bp_core_register_widgets());
    }
    add_action('init','remove_bp_core_register_widgets()');
    
    function new_bp_core_register_widgets() {
    	add_action('widgets_init', create_function('', 'return register_widget("new_BP_Core_Login_Widget");') );
    }
    add_action( 'bp_register_widgets', 'bp_core_register_widgets' );
    
    /* New BuddyPress Login Widget */
    class new_BP_Core_Login_Widget extends WP_Widget {
    
    	/**
    	 * Constructor method.
    	 */
    	public function __construct() {
    		parent::__construct(
    			false,
    			_x( '(BuddyPress) Log In', 'Title of the login widget', 'buddypress' ),
    			array(
    				'description' => __( 'Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.', 'buddypress' ),
    				'classname' => 'widget_bp_core_login_widget buddypress widget',
    			)
    		);
    	}
    
    	/**
    	 * Display the login widget.
    	 *
    	 * @see WP_Widget::widget() for description of parameters.
    	 *
    	 * @param array $args Widget arguments.
    	 * @param array $instance Widget settings, as saved by the user.
    	 */
    	public function widget( $args, $instance ) {
    		$title = isset( $instance['title'] ) ? $instance['title'] : '';
    
    		/**
    		 * Filters the title of the Login widget.
    		 *
    		 * @since BuddyPress (1.9.0)
    		 * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter.
    		 *
    		 * @param string $title    The widget title.
    		 * @param array  $instance The settings for the particular instance of the widget.
    		 * @param string $id_base  Root ID for all widgets of this type.
    		 */
    		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    
    		echo $args['before_widget'];
    
    		echo $args['before_title'] . esc_html( $title ) . $args['after_title']; ?>
    
    		<?php if ( is_user_logged_in() ) : ?>
    
    			<?php
    
     		 	/**
    		 	 * Fires before the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedin' ); ?>
    
    			<div class="bp-login-widget-user-avatar">
    				<a href="<?php echo bp_loggedin_user_domain(); ?>">
    					<?php bp_loggedin_user_avatar( 'type=thumb&width=50&height=50' ); ?>
    				</a>
    			</div>
    
    			<div class="bp-login-widget-user-links">
    				<div class="bp-login-widget-user-link"><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></div>
    				<p>TEST</p>
    				<div class="bp-login-widget-user-logout"><a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a></div>
    			</div>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedin' ); ?>
    
    		<?php else : ?>
    
    			<?php
    
    			/**
    		 	 * Fires before the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedout' ); ?>
    
    			<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    				<label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    				<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    
    				<label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
    				<input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value="" <?php bp_form_field_attributes( 'password' ) ?> />
    
    				<div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
    
    				<input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" />
    
    				<?php if ( bp_get_signup_allowed() ) : ?>
    
    					<span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
    
    				<?php endif; ?>
    
    			</form>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedout' ); ?>
    
    		<?php endif;
    
    		echo $args['after_widget'];
    	}
    
    	/**
    	 * Update the login widget options.
    	 *
    	 * @param array $new_instance The new instance options.
    	 * @param array $old_instance The old instance options.
    	 * @return array $instance The parsed options to be saved.
    	 */
    	public function update( $new_instance, $old_instance ) {
    		$instance             = $old_instance;
    		$instance['title']    = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
    
    		return $instance;
    	}
    
    	/**
    	 * Output the login widget options form.
    	 *
    	 * @param $instance Settings for this widget.
    	 */
    	public function form( $instance = array() ) {
    
    		$settings = wp_parse_args( $instance, array(
    			'title' => '',
    		) ); ?>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddypress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
    		</p>
    
    		<?php
    	}
    }
    
    ?>

    I was trying to following the below guide to remove the function that initializes the login widget and then redirect it to my own new one:

    http://venutip.com/content/right-way-override-theme-functions

    Obviously hasn’t worked. Any ideas ?

    #242722
    danbp
    Participant

    have you found this post ?

    How To Run A Contest On WordPress


    Several plugins are mentionned; also note that myCred is awesome with BP.

    #242708
    danbp
    Participant

    Custom code goes to child-theme functions.php

    Customizing BuddyPress needs a certain level of competence with PHP and the inner workings of BuddyPress & WordPress.

    Please read https://codex.buddypress.org/developer/

    and see also https://codex.wordpress.org/Functions_File_Explained

    #242702
    @mercime
    Participant

    @jld142 Based on title of this topic, you only want to change the styling aka CSS. If that’s the case, you do not need to add any BP folders/files in your child theme. Just override the style in your theme’s style.css file or whatever stylesheet is enqueued in your premium theme.

    If however, you want to change the markup or functionality in some form or the other, then you’d have to look at https://buddypress.trac.wordpress.org/browser/tags/2.3.2/src/bp-core/bp-core-widgets.php#L22 and make the fix in your child theme’s functions.php – no need to copy over any BP folder.

    #242689
    Jld142
    Participant

    Hello guys,

    I have been using WordPress for about 8 months now and have just started using child themes to allow updating my code a lot easier – previously i used to ‘hack’ the code and edit core files.

    I use the Avada theme and have successfully created a child theme. I am now looking to edit the BuddyPress Login Widget via the child themes functions.php file.

    I have been doing some reading on these forums and have seen people talking about adding BuddyPress folders within a child theme.. Can someone clear this up for me please ?

    #242669
    djsteveb
    Participant

    @jordanboon0 – certainly there is more than one way to accomplish what you are proposing here.

    My first thought upon reading this is is that you can create a “multi-user blog” with wordpress. Each new artist becomes a “contributor” or even “editor” upon sign up, and they can post a new gallery easily, then your admin(s) can choose what new galleries get published.

    You go do all that with a single blog / wordpress install – and do it without buddypress, just make a cool custom author page for whichever theme you want to use.

    There are many plugins and settings for things like front end uploads, post author profiles, wordpress gallery fancy stuff and all that.

    You could also put buddypress into this mix and give your artists some extra social network stuff like private messages, groups and all that – however if you go with buddypress and and that layer to handle everything (without getting your users to submit posts / pages via standard wordpress) – then you have to get into a media plugin like rtmedia, mediapress, or – another one posted about a month ago.. anyhow – those media plugins are kind of their own “silos” – customizing how they work is not a few wp repo plugins away – and support for what you may want to do with them may be disappointing.

    Of course you could take WP, add in BP if you really want the social layer, and still use the main site blog as kind of a “multi-user (or “group” blog) and do it that way.. you could get more complex and turn it into a multi-site install where each user get’s their own unique blog with gallery plugins – but moderation of posts and such with that setup may become more of a challenge – along with the extra headaches with running a multi blog network.

    Anyhow – given the details you provided with your stated goals, I would forget about buddypress and multi-site – just install wordpress and do some searches in the wp-repo and themes section for “author pages”, “group blog” “post moderation” “front end uploads” and the various “Gallery” plugins – I think you can accomplish what you are going for pretty easily with lots of customization options.. without all the drawbacks and limitations of BP.

    #242668
    Henry Wright
    Moderator

    To customise the text, you can localise. See the Customizing Labels, Messages, and URLs article.

    To add more to the confirmation page, you can use the bp_before_registration_confirmed and bp_after_registration_confirmed hooks.

    To override the whole register.php template, see the Template Hierarchy article.

    Fiush
    Participant

    You can achieve this by using, ‘if ‘ and ‘else ‘ statement.

    You can do that in theme/members/single/home.php

    You can modify the code,

    <?php locate_template( array( ‘members/single/member-header.php’ ), true ); ?>

    To,

    1) if user have profile field ‘male ‘ then
    <?php locate_template( array( ‘members/single/member-header-male.php’ ), true ); ?>

    Else (eg: based on profile field selected,)

    2) <?php locate_template( array( ‘members/single/member-header-female.php’ ), true ); ?>

    Make sure to create two different templates in the same directory.

    If this not the case, Henry can help you

    #242616
    peter-hamilton
    Participant

    You will have to make a buddypress template folder in your theme/child.

    “entry.php” is the file you can add an icon, right after the following code which is the username/link.

    <a href="<?php bp_activity_user_link(); ?>">

    #242601
    djsteveb
    Participant

    I am interested in finding out what you come up with in regards to this.

    I tried to use something like:

    ‘field’ => 2,
    );

    (some info from https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/ )
    to replace the actual names I was using in a page title template thing, and never got it to work – but I have no idea what I am doing – trying to franken-hack a bit of code provided by one person and replace the field names with field numbers so the code would work with a different site I was playing with – when I tried replacing the name with this field number thing it did not work – but again I don’t understand php nor bp stuff well enough to know if I just missed a character, or something else was needed, or the function isn’t working as it should.

    danbp
    Participant

    To do that you need the xprofile field ID and the user ID.

    Here an example to show a profile fied containing a fax number. The filed is called Fax (case sensitive).

    Add this function to your child theme’s functions.php or better, into bp-custom.php

    function my_directory() {	
    if ( bp_is_active( 'xprofile' ) )
    
    	if ( $memberfax = xprofile_get_field_data( 'Fax', bp_get_member_user_id() ) ) :
    		echo '<br/><div class="Fax">';		
    		echo $memberfax;
    		echo '</div>';
    	endif;	
    
    }
    add_filter ( 'bp_directory_members_item', 'my_directory' ); 
    #242582
    danbp
    Participant

    Hi @alexsmoli,

    you copy the original template file from:
    buddypress/bp-templates/bp-legacy/buddypress/activity/entry.php

    to the child theme to get this:
    your-child/buddypress/activity/entry.php

    Reference

    Theme Compatibility & Template Files

    #242581
    danbp
    Participant

    You copy the original file from:
    buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    to the child to get this
    your-child/buddypress/members/mmebers-loop.php

    Reference

    Theme Compatibility & Template Files

    #242565
    djsteveb
    Participant

    @bergblume

    If I may suggest that instead you add to your robots.txt file some wildcard rules such as:
    Disallow: *members/*activity*
    Disallow: */activity/p/*

    as to where I think it may be possible to pull some info from the activity posts to create page titles and other meta stuff, most activity posts are going to be short in most cases, and having a bunch of new pages indexed (even properly with title and meta stuff) is likely to add little value to your site overall – and in fact might create a situation where a bulk of your site pages are considered “thin content” – which would hurt your seo more than any proper page titles will on activity pages.

    Considering you are also asking about methods for adding meta keywords, I think you are looking for SEO help that is waaaaaaay outdated – unless you are going for different search engines aside from the big G, bing / yahoo for some reason – in which case my knowledge of the other spiders and their indexing methods is tiny.

    Now if you are trying to get proper page titles on your “groups” and member profile pages, I think that would be a worthwhile effort.

    Just a few random suggestions, I am not a BP dev or prof coder yet – others may have different advice.

    I think that getting and using this info will be better / easier perhaps about WP 4.4 or whenever they include the REST API in the core – and then it should be easy peazy for themes to pull and use this info – not that it should be rocket science to do it now… however I have had no luck getting help with similar issues on other BP pages in the past.

    It usually boils down to BP peeps saying that page title and meta stuff should be handled by your theme.. your theme devs will say they use the standard wp_title function (or something like that – which has been flipped around recently) – and that kind of stuff if you want it to be beyond what is “standard wordpress” should be handled by an SEO plugin… my experience with several SEO plugins has been that they will not get into all the BP “pseudo pages” for whatever reason, perhaps because a taxonomy is not registered for them, and that makes it more difficult.

    Random thoughts for ya

    #242561
    danbp
    Participant

    Custom code goes to bp-custom.php or child-theme’s functions.php
    Code on second answer shows an usage example, it’s not the code you have to use.

    As you asked for register details, i thinked you want a resume of the registration with all mandatory xprofile fields information…

    BP on a single install doesn’t sent a welcome email. This happens only on a MS install. But you add that manually. Read here:

    Send Welcome email to Users when they activate their account on WordPress & BuddyPress Based Social Network

    #242559
    djsteveb
    Participant

    This might be what you are looking for: https://codex.buddypress.org/themes/bp-custom-php/#examples

    for detailed info, scroll up the page.

Viewing 25 results - 7,076 through 7,100 (of 32,540 total)
Skip to toolbar