Skip to:
Content
Pages
Categories
Search
Top
Bottom

Rename/Change default components

  • Avatar of dwarfsibling
    dwarfsibling
    Participant

    @dwarfsibling

    Per this original thread: http://buddypress.org/forums/topic/navigation-buttons-where-are-they#post-5165

    I would like to change the name on the basic components of BuddyPress. Notably, I would like to change Groups (which have all the behaviors I’m looking for) into ‘something else’.

    The post referenced above says “If you are simply looking for where you can change the text of the menu buttons “Home”, “Blog”, “Members”, “Groups”, “Blogs”, then it is found in the header.php file of both the home and member themes.”

    Here is my header.php from wp-content/themes/home and I see nothing in it about groups. Judging by the simplicity of the instruction above, I must be missing something fundamental – like what/where I should be looking :)

    Many thanks!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <style type="text/css" media="screen">
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    </style>

    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">

    <div id="header">
    <div id="headerimg">
    <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    <div class="description"><?php bloginfo('description'); ?></div>
    </div>
    </div>
    <hr />

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    You are looking in the right place–in header.php of the bp-sn-parent theme folder. Starting on line 86 of that file, you will find the code.

    By the way, I said look in header.php, not specifically within the <head> tag section of the header.php file. Use the search feature of your IDE and you will quickly find what you are looking for! ;)

    Avatar of dwarfsibling
    dwarfsibling
    Participant

    @dwarfsibling

    Got that – thanks! I was looking in the wrong spot for header.php (see OP)

    In any case, that looks good – so now it’s just a matter of updating all the php on the site with a reference to ‘group/groups’ on it?

    Usually if I’m trying to hard, I start to look for other solutions so I’m going to peruse the forums for a bit, but I would call this thread solved/closed with the following recap for the next person;

    To modify the labels for BuddyPress’ main front-page navigation, modify the following file

    <webroot>/wp-content/themes/bp-sn-parent/header.php

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Okay, my mistake. I read your OP too quickly. My response in the other thread was specific to a different question and I assumed that you were asking the same, specific question.

    What I believe you are actually looking to do–based on your most recent response–is to change each component’s slug or some of them. Read this article by Andy:

    http://buddypress.org/blog/how-to/customizable-slugs-in-buddypress/

    Of course, that does not solve the issue of modifying actual text within a given file.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    The easiest way to change the name of a component through the entire site is going to be to modify the buddypress-en_US.po and buddypress-en_US.mo files, search for the instances of the words you want to replace, and change them there.

    That will allow you to change the prepackaged strings that come bundled with BuddyPress. So if you want to change the phase “Your new avatar was uploaded successfully” to “Your new photo was uploaded successfully” that is the way to do it, without modifying the BuddyPress core files.

    The same works with the components. Change “Groups” to “Developers” and then change “Group Invites” to “Developers Wanted” or whatever…

    Avatar of dwarfsibling
    dwarfsibling
    Participant

    @dwarfsibling

    Jeff and John – thank you! Pretty much the kind of thing I was looking for.

    Peace!

    Avatar of dwarfsibling
    dwarfsibling
    Participant

    @dwarfsibling

    The language files seems like the way to go, but I can’t find those exact file names you mention there – can you tell me exactly where I should be looking, or do I create them from scratch? Thanks!

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

You must be logged in to reply to this topic.