Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customizing Javascript in BuddyPress


  • kpolkson
    Participant

    @kpolkson

    I’ve gotten a hang of customizing the CSS of Buddypress in my custom theme, but now I want to augment the scripts to modify the user experience. Namely, I want to start with the following two things:

    1) I want to clear the search bar after searching the main groups directory.
    2) I want to stop the page from entirely reloading if someone tries to post a topic, but forgets a title and so loses all their other progress when the page reloads and the notification comes up. Just want the notification to come up via ajax.

    What is the buddypress best practice for making these changes outside of the core bp files so that my modifications are not lost when I update BuddyPress down the road.

    EDIT: I should mention that I am using the BP Template Pack to help make BP compatible with my custom theme.

    thanks,
    k

Viewing 3 replies - 1 through 3 (of 3 total)

  • Roger Coathup
    Participant

    @rogercoathup

    If you want to add additional Javascripts — use wp_enqueue_script() to load them.

    Put your wp_enqueue_script() calls in your theme’s functions.php file.

    [Edit: and of course, remember to upload your scripts to the server. In bp-default theme, the scripts typically reside in the _inc folder, but put them wherever works best for your theme.


    kpolkson
    Participant

    @kpolkson

    Cool, thanks. But what if i want to modify the JavaScript that already comes with buddypress? Is there a tried and true way to intervene in the non-intrusive manner that filter and action does for the .php code?


    Mehul Kaklotar
    Participant

    @mehulkaklotar

    I am also looking for the same. Anyone has a solution yet?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customizing Javascript in BuddyPress’ is closed to new replies.
Skip to toolbar