Add Static tags to Buddypress Group Tags

Adding static Group Tags using the Buddypress Group Tags plugin is pretty simple. We just need to change a few lines of code to change our input method.


What you will need:

Buddypress Group Tags plugin version 1.2.2

A code editor, I like;

Mac – Esspresso

Windows – notepad ++


Once you have Buddypress Group Tags version 1.2.2 installed we need to locate the bp-group-tags.php file. This file is located in wp-content > plugins > buddypress-group-tags. Locate and open the file with your code editor.

Lines 197 -199 determine what input objects are used for the tags. We want to add static buttons for choosing tags.

Replace lines 197 – 199 with our custom code.

The code to add custom, static buttons looks like this:

<input type=”checkbox” name=”group-tags” id=”group-tags” value=”insert tag name here” />insert tag name here<br>

And here is the code in action with two check boxes. One is a Business tag, and the other is an Event tag.

<label for=”group-tags”>This Group is a;</label>
<input type=”checkbox” name=”group-tags” id=”group-tags” value=”Business” />Business<br>
<input type=”checkbox” name=”group-tags” id=”group-tags” value=”Event” />Event<br>

If you want to remove the Tag Chooser you simply remove line 201 which is:

gtags_show_tags_chooser();

now save the file and make sure you overwrite the file on your server.

Keep in mind, if you auto update the plugin it will break this edit. You will then have to redo the steps above.

Relocate admin-bar in Buddypress

I decided to install and play with Buddypress this weekend. The first thing I wanted to do was move the admin-bar to the bottom of the page. Buddypress is still very young and I expect this to be a feature you can add with a simple click.

To make things easy you might want a code editing program. This will add numbers for each line. It will make it super easy to find the right code to change. I recommend Notepad++ on the PC and Espresso on the Mac

First things first. If you havent already renamed your custom.css and site-wide.css file, we need to do that first.

You can find the files in Themes > bphome > CSS

Rename custom-sample.css to custom.css and site-wide-sample.css to site-wide.css

This will activate a custom css for us to use without modding core files.

Using a code editing program (listed above) add this code to  site-wide.css:

/* Relocate Admin-Bar */
body { padding-top: 0px !important; }
#wp-admin-bar {
bottom: 0 !important;
position: fixed !important;
top: auto !important;
}
#wp-admin-bar ul {
bottom: 27px;
}
#wp-admin-bar ul li:hover ul ul, #wp-admin-bar li.sfhover ul li ul{
bottom: auto;
position: relative;
}

/* END Relocate Admin-bar */

You should have a fully functioning admin-bar at the bottom of the page.

This will not break when you update!