Search

Search across SPYTM

bbPress - Remove “VOICES,” “POSTS,” and “FRESHNESS” Columns

S
Spytm Editor
3 min read3 views

bbPress is a powerful and popular forum plugin for WordPress, offering a lightweight solution for adding forums to your website. However, the default layout may not always align with your design preferences or requirements. One common customization request is to remove specific columns such as “VOICES,” “POSTS,” and “FRESHNESS” from the forum display. This article will guide you through three different methods to achieve this: using custom code in your theme’s 'functions.php' file, creating a custom plugin, and optionally hiding the columns with CSS.

Method 1: Modify Theme’s 'functions.php' file

The most straightforward way to remove the “VOICES,” “POSTS,” and “FRESHNESS” columns is by adding a snippet of code to your theme’s 'functions.php' file. This method directly modifies how bbPress handles forum column display. 1. Locate 'functions.php' Go to your WordPress dashboard and navigate to 'Appearance' > 'Theme File Editor'. Select 'functions.php' from the list of theme files. 2. Add the Custom Code: Copy and paste the following code into the 'functions.php' file: [fusion_syntax_highlighter theme="default" language="x-php" line_numbers="" line_wrapping="" copy_to_clipboard="" copy_to_clipboard_text="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" font_size="" border_size="" border_color="" hue="" saturation="" lightness="" alpha="" border_style="" background_color="" line_number_background_color="" line_number_text_color="" margin_top="" margin_right="" margin_bottom="" margin_left=""]ZnVuY3Rpb24gcmVtb3ZlX2JicHJlc3NfZm9ydW1fY29sdW1ucyggJGNvbHVtbnMgKSB7CiAgICB1bnNldCggJGNvbHVtbnNbJ2ZvcnVtLXZvaWNlcyddICk7ICAgIC8vIFJlbW92ZSAiVk9JQ0VTIiBjb2x1bW4KICAgIHVuc2V0KCAkY29sdW1uc1snZm9ydW0tcG9zdHMnXSApOyAgICAgLy8gUmVtb3ZlICJQT1NUUyIgY29sdW1uCiAgICB1bnNldCggJGNvbHVtbnNbJ2ZvcnVtLWZyZXNobmVzcyddICk7IC8vIFJlbW92ZSAiRlJFU0hORVNTIiBjb2x1bW4KICAgIHJldHVybiAkY29sdW1uczsKfQphZGRfZmlsdGVyKCAnYmJwX2ZvcnVtX3RvcGljX2NvdW50X2NvbHVtbicsICdfX3JldHVybl9mYWxzZScgKTsKYWRkX2ZpbHRlciggJ2JicF9mb3J1bV9yZXBseV9jb3VudF9jb2x1bW4nLCAnX19yZXR1cm5fZmFsc2UnICk7CmFkZF9maWx0ZXIoICdiYnBfZ2V0X2ZvcnVtX2NvbHVtbl9uYW1lcycsICdyZW1vdmVfYmJwcmVzc19mb3J1bV9jb2x1bW5zJyApOwo=[/fusion_syntax_highlighter]   3. Save the Changes: Click on 'Update File' to save the changes. The columns will now be removed from the forum display.

Method 2: Create a Custom Plugin

If you prefer not to alter your theme’s functions.php file, you can create a custom plugin. This method offers the flexibility of managing this feature independently of your theme. 1. Create a New Plugin Folder:

  • Using an FTP client or your hosting file manager, navigate to wp-content/plugins/.

  • Create a new folder named remove-bbpress-columns.

2. Create the Plugin File:

  • Inside the new folder, create a file named remove-bbpress-columns.php.

3. Add the Plugin Code:

  • Open the remove-bbpress-columns.php file and paste the following code:

[fusion_syntax_highlighter theme="default" language="x-php" line_numbers="" line_wrapping="" copy_to_clipboard="" copy_to_clipboard_text="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" font_size="" border_size="" border_color="" hue="" saturation="" lightness="" alpha="" border_style="" background_color="" line_number_background_color="" line_number_text_color="" margin_top="" margin_right="" margin_bottom="" margin_left=""]PD9waHAKLyoKUGx1Z2luIE5hbWU6IFJlbW92ZSBiYlByZXNzIENvbHVtbnMKRGVzY3JpcHRpb246IFJlbW92ZSBWT0lDRVMsIFBPU1RTLCBhbmQgRlJFU0hORVNTIGNvbHVtbnMgZnJvbSBiYlByZXNzIGZvcnVtcy4KVmVyc2lvbjogMS4wCkF1dGhvcjogWW91ciBOYW1lCiovCgpmdW5jdGlvbiByZW1vdmVfYmJwcmVzc19mb3J1bV9jb2x1bW5zKCAkY29sdW1ucyApIHsKICAgIHVuc2V0KCAkY29sdW1uc1snZm9ydW0tdm9pY2VzJ10gKTsgICAgLy8gUmVtb3ZlICJWT0lDRVMiIGNvbHVtbgogICAgdW5zZXQoICRjb2x1bW5zWydmb3J1bS1wb3N0cyddICk7ICAgICAvLyBSZW1vdmUgIlBPU1RTIiBjb2x1bW4KICAgIHVuc2V0KCAkY29sdW1uc1snZm9ydW0tZnJlc2huZXNzJ10gKTsgLy8gUmVtb3ZlICJGUkVTSE5FU1MiIGNvbHVtbgogICAgcmV0dXJuICRjb2x1bW5zOwp9CmFkZF9maWx0ZXIoICdiYnBfZm9ydW1fdG9waWNfY291bnRfY29sdW1uJywgJ19fcmV0dXJuX2ZhbHNlJyApOwphZGRfZmlsdGVyKCAnYmJwX2ZvcnVtX3JlcGx5X2NvdW50X2NvbHVtbicsICdfX3JldHVybl9mYWxzZScgKTsKYWRkX2ZpbHRlciggJ2JicF9nZXRfZm9ydW1fY29sdW1uX25hbWVzJywgJ3JlbW92ZV9iYnByZXNzX2ZvcnVtX2NvbHVtbnMnICk7Cg==[/fusion_syntax_highlighter]   4. Activate the Plugin:

  • Go to your WordPress dashboard and navigate to Plugins.

  • Find the Remove bbPress Columns plugin and activate it.

Method 3: Hide the Columns Using CSS (Optional)

If you want to hide these columns without removing them from the HTML source, CSS is a quick and easy solution. This method is purely cosmetic, meaning the columns will still be part of the page but won’t be visible to users. 1. Locate style.css:

  • Go to your WordPress dashboard and navigate to Appearance > Theme File Editor.

  • Select style.css from the list of theme files.

2. Add the Custom CSS:

  • Copy and paste the following CSS into the style.css file:

[fusion_syntax_highlighter theme="default" language="x-sh" line_numbers="" line_wrapping="" copy_to_clipboard="" copy_to_clipboard_text="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" font_size="" border_size="" border_color="" hue="" saturation="" lightness="" alpha="" border_style="" background_color="" line_number_background_color="" line_number_text_color="" margin_top="" margin_right="" margin_bottom="" margin_left=""]LmJicC1mb3J1bS12b2ljZXMsIC5iYnAtZm9ydW0tcG9zdHMsIC5iYnAtZm9ydW0tZnJlc2huZXNzIHsKICAgIGRpc3BsYXk6IG5vbmU7Cn0K[/fusion_syntax_highlighter]   3. Save the Changes:

  • Click on Update File to save the CSS changes. The columns will now be hidden from view on your forums.

Conclusion

Customizing bbPress to suit your needs can greatly enhance the user experience on your forum. By following one of the methods outlined above, you can easily remove or hide the “VOICES,” “POSTS,” and “FRESHNESS” columns from your bbPress forum. Whether you prefer to modify the functions.php file, create a custom plugin, or simply use CSS, you now have the tools to achieve the look and functionality you desire.

Read Next

No Image
Uncategorized3 min read

How to Download Torrent File

Torrent is a popular method for sharing files, books, movies, songs, etc. Torrent file has a .torrent extension with file size of less than 500KB. Us...