Skip to:
Content
Pages
Categories
Search
Top
Bottom

functions.php and bp-custom.php


  • David
    Participant

    @dlabbe

    I am new to BP and in my early stages of learning php so please be easy on me. I am trying to learn the inner working of BP, but I can’t find the functions.php nor the bp-custom.php files. can someone please direct me to where I can find the file. I have read to documentation, but those file are not where they should be found or am I looking over something? I looked for (wp-content/plugins/bp-custom.php.)…not there. Thanks for any help in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • bp-custom does not exist until you create it. functions.php lives in the theme root


    ovizii
    Participant

    @ovizii

    where would I create bp-custom.php? I want to use that one as I haven’t decided upon a final theme yet so I’d rather go with bp-custom.php


    Pisanojm
    Participant

    @pisanojm

    You can create this and put directly into your plugins directory (something like the following):

    public/wp-content/plugins


    ovizii
    Participant

    @ovizii

    do I have to manually activate it or is buddypress looking for it and loads it by default?
    cause otherwise I’d rather put it into mu-plugins if I need to activate it anyway…

    Null question: try it and see ;)


    ovizii
    Participant

    @ovizii

    it loads automatically but doesn’t seem to support comments. i.e. this content:

    `/*customize all slugs*/
    /*define( ‘BP_ACTIVATION_SLUG’, ‘activate’ );*/
    define( ‘BP_ACTIVITY_SLUG’, ‘actions’ );
    /*define( ‘BP_BLOGS_SLUG’, ‘journals’ );*/
    `

    will properly apply the uncommented line but simply print out the commented lines. will therefore stick with wp-config.php


    Roger Coathup
    Participant

    @rogercoathup

    You should set your slugs in wp-config.php

    Comments should be fine in bp-custom.php – there must some error in the way you have the file set up

    Ps you are right that functions.php is theme specific, and bp-custom.php is install wide. However there are also order of invocation issues.. They don’t happen at the same place in the initialisation.

    For slug and URL mods have a read of the documentation on here


    ovizii
    Participant

    @ovizii

    well, my idea was this:

    reading through the forums and the codex I found a couple of settigns that seemingly can be used from wp-config.php BUT I don’t want to clutter it too much.
    Alternatively I can use bp-custom.php or make a small plugin and pop it into mu-plugins.

    here is my collection of lines, please let me know where I can find more (built-into BP as I know plugins also offer several of these). What is recommended for what? I try to use wp-config.php only for WP related stuff, mu-plugins only for stuff that really needs to be running on every page and functions.php for stuff specific for my theme (and in this case the main page)

    `/*add user with ID as group admin, alternatively change to mod*/
    define( ‘BP_RESTRICTGROUP_AUTOADD_ADMIN_USER_ID’, 1);
    /* disable the admin bar*/
    /*define( ‘BP_DISABLE_ADMIN_BAR’, false);*/

    /*customize all slugs*/
    /*define( ‘BP_ACTIVATION_SLUG’, ‘activate’ );*/
    /*define( ‘BP_ACTIVITY_SLUG’, ‘activity’ );*/
    /*define( ‘BP_BLOGS_SLUG’, ‘journals’ );*/
    /*define( ‘BP_FORUMS_SLUG’, ‘discussions’ );*/
    /*define( ‘BP_FRIENDS_SLUG’, ‘peeps’ );*/
    /*define( ‘BP_GROUPS_SLUG’, ‘gatherings’ );*/
    /*define( ‘BP_MEMBERS_SLUG’, ‘chefs’ );*/
    /*define( ‘BP_MESSAGES_SLUG’, ‘messages’ );*/
    /*define( ‘BP_REGISTER_SLUG’, ‘register’ );*/
    /*define( ‘BP_SEARCH_SLUG’, ‘search’ );*/
    /*define( ‘BP_SETTINGS_SLUG’, ‘settings’ );*/
    /*define( ‘BP_XPROFILE_SLUG’, ‘info’ );*/

    /*customize more stuff*/
    /*Put profiles in the root � http://example.org/username/*/
    /*define ( ‘BP_ENABLE_ROOT_PROFILES’, true );*/

    (btw. since I have decided upon the final theme to use, I guess I will be going via the functions.php route)

    /*Change the default tab opened when looking at a user’srofile (default is activity):*/
    /*define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ );*/
    `
    Also if you want yo ucan give some more information about order of invocation?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘functions.php and bp-custom.php’ is closed to new replies.
Skip to toolbar