Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,826 through 5,850 (of 32,522 total)
  • Author
    Search Results
  • #178929
    oris6791
    Participant

    I have tried so many codes on my child theme css to add custom codes. I can’t seem to get it done.

    my website is: theceoafrica.com
    theme: tdMacro theme

    Can anyone PLEASE help me figure out how to:

    1. To remove the blue link colour after mouse click on each menu item
    2. To add a white border on current/active menu item
    3. Please i also need to adjust the width of my website. It doesn’t fit into the window.

    I would really appreciate your help. Thank You.

    #178926
    Robin W
    Moderator

    for main page then use the forum shortcode in the main page

    [bbp-topic-index]

    or use on of the other shortcodes

    Shortcodes

    #178925

    In reply to: Roles and limits

    Robin W
    Moderator

    you can add roles and/or change their names – see

    Custom Capabilities

    The following in an example that both adds new roles and changes the names of existing.

    /* bbPress Custom Roles */
    function add_custom_role( $bbp_roles ) {
     
    
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'Craftsman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role3'] = array(
    'name' => 'Journeyman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role4'] = array(
    'name' => 'Adept',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role5'] = array(
    'name' => 'Artisan',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster
    );
    $moderator = bbp_get_moderator_role() ;
    $bbp_roles[$moderator] = array(
    'name' => 'Councilman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as moderator);
    $keymaster = bbp_get_keymaster_role() ;
    $bbp_roles[$keymaster] = array(
    'name' => 'Advisor',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    );
    $apprentice = bbp_get_participant_role() ;
    $bbp_roles[$apprentice] = array(
    'name' => 'Apprentice',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    you can limit access to forums byh changing their visibility

    Public – Anyone can see these forums
    Private – Only logged in registered users with a forum role can see these forums
    Hidden: Only Moderators/keymasters can see these forums

    or if you want more control by using :
    https://wordpress.org/plugins/bbp-private-groups/

    Thomas_k
    Participant

    Hi guys,

    I made a redirect php code the the main forum page but i want to display a custom message for each action that is made. So i the user doesn’t enter a password or a username i want to display a message like, you did enter the wrong password or username, please try again.

    How do i add this in the php code?

    This is the php code i got from the internet for redirecting to the forum page if…. .

    add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );

    add_action(‘login_redirect’, ‘redirect_login’, 10, 3);
    function redirect_login($redirect_to, $url, $user) {
    if($user->errors[’empty_password’]){
    wp_redirect(get_bloginfo(‘url’).’/forum/’);
    }
    else if($user->errors[’empty_username’]){
    wp_redirect(get_bloginfo(‘url’).’/forum/’);
    }
    else if($user->errors[‘invalid_username’]){
    wp_redirect(get_bloginfo(‘url’).’/forum/’);
    }
    else if($user->errors[‘incorrect_password’]){
    wp_redirect(get_bloginfo(‘url’).’/forum/’);
    }
    else{
    wp_redirect(get_bloginfo(‘url’).’/forum/’);
    $a = “Hello “;
    }
    exit;
    }

    Thanks in advance,

    Jottem15

    #178863
    goviajero
    Participant

    Hi,

    I created a new page and added the bbpress forum shortcode but as you can see here http://www.goviajero.com/discussion-board/ the main menu doesn’t show up. Only the top menu is enabled which is bad because its tiny and the blank header doesn’t look good too.

    I’ve already searched on the internet but still clueless how to fix this. Is there any easy way to figure this out? This is my last resort. Please help. Thanks!

    Mel

    #178847
    contemplate
    Participant

    Hmm. Ok it looks like my theme (Kleo) has a different forum template. Simply put the custom reply.js file was going to the Parent Node wrapper which put the Reply form at the bottom of any child replies. I simply had to have it find the first child node of the wrapper so it could drop the reply form right underneath.

    I just looked at your staging site which is a different template. Try this instead:

    reply.appendChild(respond);

    #178841
    Robin W
    Moderator

    If you are not a coder then use the last post plugin above which does it for you

    #178829
    treeflips
    Participant

    I’ve opened it up and can’t figure out how to hack it into my template. I was already able to rename the string to “Last Post”.

    Now figuring out, which template files to edit and what lines to put/replace. Not a coder :/

    #178796
    alexander12111
    Participant

    Maybe we can use code in php my admin to setup key-muster role for the admin user?

    #178790
    contemplate
    Participant

    @jon-fergus I got this fixed with the reply.js file you include in your child theme.

    simply change this line:
    reply.parentNode.appendChild(respond);

    to this:
    reply.parentNode.children[1].appendChild(respond);

    And the reply box should appear directly under the post you are replying to.

    Stephen Edgar
    Keymaster

    bbPress includes the “no replies” view, so you would only need to replace the “top five” shortcode you are currently using with bbPress’ [bbp-single-view id=no-replies] 🙂

    #178782
    Stephen Edgar
    Keymaster

    This sounds like an issue with your theme displaying next and prev links for bbPress’ forum custom post type.

    If you temporarily switch to one of the default Twenty themes, say Twenty Fifteen can you still see the next and prev links?

    If so you might want to contact the theme author or take a look at creating a custom bbPress template for theme, see: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #178772

    In reply to: Quote

    ico33
    Participant

    I repost some questions

    1) is there a way to add a sort of “code” somewhere, to have the QUOTE in bbpress posts?

    2) If not, is there a plugin that somebody knows? Obviously, if possible, I would prefer some code to avoid another plugin

    3) Anybody knows if the function “quote” will be updated in a future version of bbpress? I think I read it some years ago, but it didn’t still arrive.

    Thank you for helping

    #178770
    #178767

    In reply to: Change avatar size

    treeflips
    Participant

    It’s not. You have to look at the DIV CLASS that surrounds the html code. And then track that down and adjust it.

    #178751
    hanifascraps
    Participant

    Wordpress 4.6.1
    Bbpress 2.5.10 |

    Hi there,
    Today I found here the forum some very useful code to help me change something as colores and sizes.
    But there is a component I could’t change, that is the Forum-Title.
    Is there anyone that can help with some simple css as how to change the forum title
    I thank you in advance.

    #178750
    hanifascraps
    Participant

    Thank you @robkk for your code on how to change the bakground-color.
    It help me a lot.
    Kind Regards

    hanifascraps
    Participant

    I just want to thank @fpradmin because parte of his code, just help me a lot.
    I has able to change the size font on my bbpress forum.

    Kind Regards,

    Julia_B
    Participant

    I want to switch the Top Five Topics widget on my site to a Topics With No Replies widget.

    I think I’ve found the code referring to the Top Five Topics widget in functions.php – this looks like it:

    function rk_top_five_view() {
    bbp_register_view( ‘top-five’, __( ‘5 Most Popular Topics’ ), array(
    ‘meta_key’ => ‘_bbp_reply_count’,
    ‘posts_per_page’ => ‘5’ ,
    ‘ max_num_pages’ => ‘1’,
    ‘orderby’ => ‘meta_value_num’ ),
    false );
    }

    add_action( ‘bbp_register_views’, ‘rk_top_five_view’ );

    And I think this is the relevant code on the page where the widget is displayed:
    [bbp-single-view id="top-five"]

    According to https://codex.bbpress.org/features/shortcodes/ the code for No Replies is:
    [bbp-single-view id=’no-replies’]

    So I’m guessing that on the page I just need to replace top-five code with no-replies…?

    But what about the code in functions.php?

    I found this on github:

    bbp_register_view(
    ‘no-replies’,
    __( ‘Topics with no replies’, ‘bbpress’ ),
    apply_filters( ‘bbp_register_view_no_replies’, array(
    ‘meta_key’ => ‘_bbp_reply_count’,
    ‘meta_value’ => 1,
    ‘meta_compare’ => ‘<‘,
    ‘orderby’ => ”
    )
    ) );
    }

    Is this what I need? Or should it start with function like the current code I posted at the top?

    Please excuse me if I’m missing something obvious here – I’m just the website owner, not a developer.

    Thanks in advance 🙂

    #178693

    In reply to: Quote

    ico33
    Participant

    Well, that when possible is better to use code and not a plugin. But if you know a good plugin for quote… tell me tha name. Thank you

    #178671
    Robkk
    Moderator

    You are going to have to edit your theme templates yourself since this is custom development for your theme.

    What you need is possibly bbp_topic_reply_count() or bbp_topic_post_count(), depending on if you are showing the lead topic on your site. I am not sure if doing this will work or not.

    #178670

    In reply to: Manual topic labels

    Robkk
    Moderator

    I added how to create status labels here. There is a way to create a hot label, but what I posted is just for a certain number of replies posted in a topic. Other forum systems use rating or number of replies in a certain time frame. So adjust as you please. Using the classes I have in the code you can style the label with CSS.

    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#24-show-status-labels-for-bbpress-topics

    #178669
    Robkk
    Moderator

    This is a possibly known issue that is theme/bbPress theme compatibility related.

    https://bbpress.trac.wordpress.org/ticket/2966

    To fix this place the content-search.php and form-search.php files from the bbPress plugin to your child theme in a folder called bbpress.

    If you haven’t created a child theme create one.

    https://codex.bbpress.org/themes/theme-compatibility/

    https://codex.wordpress.org/Child_Themes

    #178668

    In reply to: Quote

    Robkk
    Moderator

    Whats the problem in using a plugin? You would have the same code thats in a plugin just instead in a themes functions.php file.

    #178667
    Robkk
    Moderator

    Is it really just replace the underscores with spaces in this __@mention and it won’t work for you.

    This is blowing my mind right now.

    Did you do plugin and theme troubleshooting??

    https://codex.bbpress.org/getting-started/troubleshooting/

Viewing 25 results - 5,826 through 5,850 (of 32,522 total)
Skip to toolbar