BuddyDev

Search

[Resolved] rename bp-nouveau folder

  • Participant
    Level: Enlightened
    Posts: 64
    David on #43272

    Is there any way this can be done if so how?

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #43313

    Hi David,
    Thank you for the question.

    1. Please visit wp-content/plugins and add the following to bp-custom.php

    
    add_action( 'bp_loaded', function() {
    
    	$bp = buddypress();
    	bp_register_theme_package(
    		array(
    			'id'      => 'nouveau',
    			'name'    => __( 'BuddyPress Nouveau', 'buddypress' ),
    			'version' => bp_get_version(),
    			'dir'     => trailingslashit( $bp->themes_dir . '/community' ),
    			'url'     => trailingslashit( $bp->themes_url . '/community' ),
    		),
    		true
    	);
    }, 13);
    

    Now, Please visit wp-content/plugins->buddypress/bp-templates and rename “bp-nouveau” to “community”

    This is one of the ways. A better way will be to copy the BP-Nouveau templates and register them as a new template pack.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 64
    David on #43359

    Do you have any info that would describe how to add them to a pack? and what are the benefits of doing this?

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #43362

    Hi David,
    I am sorry, I don’t get your last question. Please help me understand.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 64
    David on #43575

    You said “A better way will be to copy the BP-Nouveau templates and register them as a new template pack”

    I assume this would eliminate the hard coding problem and would allow me to change the files as I like?

    I would need a step-by-step guide for this.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #43582

    Hi David,
    No, That would not eliminate the hard coding. That will make you the sole maintainer of that new template pack.

    The advantage is that in next BuddyPress update, your template pack will keep working. The disadvantage is that you will have to maintain and update this template pack on your own.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 64
    David on #43587

    Well, that is fine I have no problem maintaining it. But I would also like to eliminate the hard coding problem right now.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #43596

    Hi David,
    By hardcoding you are referring to the names of the css/js files? Once you have your own copy of the template pack, you control how the assets are loaded and from where, so you can rename them and update the code loading it.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 64
    David on #43615

    ok so how can I proceed?

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #43642

    Hi David,
    I am not sure what do you mean.
    If you mean registering a new template pack, you can simply copy the bp-nouveau and put it inside a plugin. Then register the template pack and override in your theme/child theme.

    If none of the above makes sense or you are not comfortable writing PHP code, I will suggest simply renaming the bp-nouveau template as in my previous reply and then override the buddypress-functions.php in your child theme.

    I am sorry for the inconvenience you are having, I understand that the lack of documentation is causing you trouble but I do not see a better way to assist you with it.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved