Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 5,626 through 5,650 (of 31,072 total)
  • Author
    Search Results
  • #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.

    #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.

    #242555

    In reply to: Add dynamic menu link

    danbp
    Participant

    Try this:

    
    // depending the theme Main Menu, somwhere near Home, About, etc
    function bpfr_custom_setup_nav( $items) {
    	
        if ( is_user_logged_in() ) {		
            $items = '<li><a href="'. bp_get_loggedin_user_link() .'activity/news-feed/">News feed</a></li>';	
        }
        return $items;
    }
    // 10 is the priority, 1 is the position in the menu
    add_filter( 'wp_nav_menu_items', 'bpfr_custom_setup_nav', 10, 1 );
    
     

    References:

    wp_nav_menu_items


    https://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items

    #242543
    danbp
    Participant

    Where do I put this and how do I make sure it doesn’t get removed

    Custom code can be added to bp-custom.php

    #242531

    In reply to: Stop Load More

    bp-help
    Participant

    @bigkahunaburger
    You must be using a plugin, custom code, or theme that adds this because BP doesn’t automatically load more. I put a plugin on github over 2 years ago here: https://github.com/bphelp/bp-auto-load-activity
    I have no idea if it even works anymore. You may want to check your plugins to see if you have it installed and activated. Brajesh from Buddydev also did a plugin that did this but I can’t remember the name of it right off. If its not one of these plugins it has to be either custom code or maybe built into your theme. Hope this helps, good luck!

    #242509
    danbp
    Participant
    #242504
    danbp
    Participant

    biographical information, fax and maybe even addresses. These are WordPress or theme specific fields which are not visible on frontend profiles. BP doesn’t use them if you use the xtended profile component.
    Anyway…

    Try this snippet, and use it to your need from within your child-theme functions.php

    function remove_user_fields(){
    
    // Print jQuery that removes unneeded elements
      ?>
    
      <script type="text/javascript">
        jQuery(document).ready( function($) {
        // the magic goes here...
          var ids = ['#description', '#comment_shortcuts', '#color-picker']; // Check in page source for other ID's
          for (var i = 0; i < ids.length; i++) {
            $(ids[i]).closest('tr').remove();
          }
        });
      </script>
    
      <?php
    }
    
    add_action( 'admin_footer', 'remove_user_fields' );
    #242487

    In reply to: Add dynamic menu link

    danbp
    Participant

    Codex reference:

    Members Navigation Menus

    Also, on the forum, several topics, with many snippets:
    https://buddypress.org/support/search/bp_nav_menu/

    Here a working example, which add 2 external links on a profile.

    function bpfr_custom_setup_nav() {
      if ( bp_is_active( 'xprofile' ) )
    ?>
    <li><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members', 'buddypress' ) ); ?></a></li>
    <li><a href="http://buddypress.org" target="_blank" title="BP">BuddyPress</a></li>
    <?php  
    }
    add_action( 'bp_member_options_nav', 'bpfr_custom_setup_nav' );
    danbp
    Participant

    @tomnikkola,

    as you discovered already, the CSS trick is a poor solution.
    Two solution are on hand.
    A first one, which applies to all activity feeds.
    Basically the below snippet handles globally the activties output. You simply remove the activity(ies) you don’t want to see from the list. Note that almost all activity types are listed.
    Add it to child functions.php or to bp-custom.php

    function demo_parse( $retval ) {
    	// existing BP/bbP activities
    	// remove the one you wont to see from that list
    	$retval['action'] = '
    		activity_comment,
    		activity_update,
    		bbp_topic_create,
                    bbp_reply_create,
    		friendship_created,
    		joined_group,
    		last_activity,
    		new_avatar,
    		new_blog_post, 	
    		new_member,
    		updated_profile
    	';	
    
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'demo_parse' );

    Codex:

    Using bp_parse_args() to filter BuddyPress template loops

    The second solution, is to use a child-theme with a modified activity loop. This let you handle finer condition for each user.

    Read this tut how you can do that.

    Codex:

    Activity Loop

    #242480
    guidobrasil
    Participant

    Hi dan,

    Thanks for your reply! I ended up taking away the kendo UI as I could reproduce the visual and functionality with Bootstrap, native in the worpress theme..

    That was indeed the solution! 🙁

    #242479

    In reply to: Custom login-form

    Henry Wright
    Moderator

    There will be plugins in the WordPress Plugin Directory that can do both of these things. Theme My Login won’t do exactly what you need but it’s a great plugin I’d recommend if you need to to bring the login page into your theme.

    #242448
    danbp
    Participant

    @trobertson82,

    use this function bp_get_template_part( 'activity/post-form' );

    Add this to bp-custom.php or child theme’s functions.php

    function whats_new_my_friend() {
    	if ( bp_is_user_friends_activity() ) :
    		bp_get_template_part( 'activity/post-form' );	
    	endif;
    }
    add_action( 'bp_before_member_body', 'whats_new_my_friend' );
    #242440
    kjgbriggs
    Participant

    checking the Functions file, there is a huge amount of php requirements specified at the top (13 of them), I am guessing this will mess with me trying to make a child theme out of it.

    On a lighter note.
    The CSS files are included separately so I have the styles for BBPress and BuddyPress separated out for me.

    I have tried adding these to my custom CSS, but they don’t seem to change that much, just the overall placement of things.

    #242436
    djsteveb
    Participant

    @kjgbriggs – just took a look at your oblivion thing you like – it appears to be the forums layout you are concerned with here – which may end up being more of a “bbpress” theme-ing issue – not so much buddypress… last I checked you can add “bbpress” as an auto-addon for buddypress – but if it’s not profiles and activity stream stuff – you may need to look up some “bbpress” specific theme things if you run into issues – not sure if they go over all that at bbpress dot org these days or not.. I have not checked those forums / docs in years.

Viewing 25 results - 5,626 through 5,650 (of 31,072 total)
Skip to toolbar