Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do i change the table header word “Forum” to something else like “Index”


  • orko9696
    Participant

    @orko9696

    I need to change the table header “Forum” to “Index”, searched for a while but didnt found any fix yet.
    Isnt there any css hack available?

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

  • Robin W
    Moderator

    @robin-w

    If you want to change it everywhere then put this in your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    if ( $translated_text == ‘Forum’ ) {
    $translated_text = ‘new text’;
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘change_translate_text’, 20 );

    Functions files and child themes – explained !


    orko9696
    Participant

    @orko9696

    This causes the following error, i added that in theme functions.php

    Fatal error: Cannot redeclare change_translate_text() (previously declared in /home/joshtaylor/public_html/wp-content/plugins/bbp-last-post/includes/functions.php:60) in /home/joshtaylor/public_html/wp-content/themes/flycase/functions.php on line 105


    Robin W
    Moderator

    @robin-w

    ok that’s just because you can have only one function name, and this is duplicating an existing oine (in a plugin I wrote!)

    Do this instead

    //This function changes the text wherever it is quoted
    function orko_change_translate_text( $translated_text ) {
    if ( $translated_text == ‘Forum’ ) {
    $translated_text = ‘new text’;
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘orko_change_translate_text’, 20 );


    orko9696
    Participant

    @orko9696

    Great to know that you developed the plugin, this some sort assures me of my solution. But the problem still persists with the code you provided, now it shows

    Parse error: syntax error, unexpected T_STRING in /home/joshtaylor/public_html/wp-content/themes/flycase/functions.php on line 102


    Robkk
    Moderator

    @robkk

    Just copy loop-forums.php from the bbPress plugin templates into a folder called bbpress in your child theme, or edit the one that is already custom from your theme to a child theeme.

    Edit this and change Forum to what you want.

    <li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>


    orko9696
    Participant

    @orko9696

    Pefect, worked like a charm. Thanks man

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