Skip to:
Content
Pages
Categories
Search
Top
Bottom

add a specific class

  • @neecride

    Participant

    Hello,

    I look for how to add a class css on loop-single-forum.php line 12

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>

    on default bbp_forum_class();

    sorry I’m french ! I do not understand English too

Viewing 4 replies - 1 through 4 (of 4 total)
  • @robin-w

    Moderator

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    amend line 12 to

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class('', $classes[] = 'hello' ); ?>>

    @neecride

    Participant

    Thank you !

    I found the file in part !!

    Now I would like to change while loop_forums in index forums on loop-forums.php

    exemple : http://gauge.wpengine.com/forums/

    i does not use shortcode I create a forum page and i edit the default page in bbpress folder on my folder template !

    translated by google !!

    @robkk

    Moderator

    You can also use this PHP function to add a class to the forum instead of doing it manually.

    function rkk_add_forum_classes( $classes ) {
     $classes[] = 'class';
     return $classes;
    }
    add_filter( 'bbp_get_forum_class','rkk_add_forum_classes' );

    Now I would like to change while loop_forums in index forums on loop-forums.php

    I do not know exactly what you are trying to do, but for just customizing it you can put the loop-forums.php file in a child theme in a folder called bbpress and then customize the file to your liking.

    https://codex.wordpress.org/Child_Themes

    @neecride

    Participant

    Thanks you I found to my previous request

    Make Forum Category Index page look like Topics page

    just another question : when I post a new message is nothing to indicate that there is a new post with a icon for example ?

    should we make it a condition but with what ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar