Skip to:
Content
Pages
Categories
Search
Top
Bottom

template for post-form label

  • I’m currently editing the default theme template for the latest version. Everything is going well, except I can’t find the code reference for the “Reply” label (it shows up as <h2 class='post-form'>Reply</h2> in the HTML output. The rest of this section is editable in post-form.php. Where do I need to look to find the section (basically I just want to either remove this label and add a new one separately, or else be able to wrap some more code around it). The only other thing which may shed some light on this is the preceeding code: do_action( 'post_form_pre_post' ); but I have no idea what this function does.

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

  • Graeme
    Member

    @agentmaximus

    Try editing topic.php in the default template and replace:

    <?php post_form(); ?>

    with:

    <?php post_form('Reply to this topic:'); ?>

    This is a simple way to make the change you want.

    Note that rather than editing the default template, you can make use of the powerful templating behaviour of bbPress if you create your own theme. With custom themes, bbPress will always pick up missing template files from the default kakumei theme! That means custom themes can be quite simple!

    1. Create a directory called my-templates.
    2. Create a directory in that directory called myfirsttheme.
    3. Copy style.css, screenshot.png and topic.php from bb-templates/kakumei to your my-templates/myfirsttheme directory.
    4. Edit my-templates/myfirsttheme/style.css and change:
      Theme Name: Kakumei

      to

      Theme Name: myfirsttheme

    5. Change my-templates/myfirsttheme/topic.php with the change described above to topic.php.
    6. At this point you should see your own custom template in the admin backend.

    That allows you to setup your own theme. Then when new versions of bbPress come along you may not have to reedit the default templates – just copy your custom theme into the new/upgraded bbPress installation.

    I hope that makes sense.

    Note:

    Sometimes new functionality in bbPress will mean that it is best to copy the default template files and re-apply your changes in your custom theme.

    thanks, but that wasn’t exactly what I meant. I’m less concerned about wanting to change the wording of the text, and more interested in replacing the <h2> tags around it with something else.

    never mind I found it. looks like i need to hack template-functions.php

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

You must be logged in to reply to this topic.