Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Add a button to all topics


  • lmolenje
    Participant

    @lmolenje

    I want to add a button to every new topic so that the creator of the topic has the option to click the button.

    I think I need to edit a php but I cannot figure out which one.

    If there is a plugin that allows this I would be happy with that.

    Thansks,

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

  • danbp
    Moderator

    @danbp

    @lmolenje,

    click click click ! But what should this button do ? Usually, a topic relates to a forum, and a BuddyPress forum is the bbPres plugin.

    Give better details, please ! 😉


    lmolenje
    Participant

    @lmolenje

    It is essentially a link that I want to add to every forum. Many plugins have this but they only apply to posts and pages. The link will connect to a third party app. I have some custom code that I can embed into the php so that I can link wont take me off my site. However, I am unable to find the forum.php for buddy press in my installation.

    I am looking for it in:
    /apps/wordpress/htdocs/wp-content/themes/buddy


    heilyn
    Participant

    @heilyn

    I’m not really sure what button you are looking. Is it something like this kind of plugin?

    https://wordpress.org/plugins/buddyforms-posts-to-posts-integration/


    danbp
    Moderator

    @danbp

    @lmolenje,

    BuddyPress works together with the bbPress plugin when you use a forum.

    If you want to add an extra button or a link or whatever, you simply check for the hook you want to use in one of the bbPress template files (bbpress/templates/default/bbpress/…) and attach a custom function to it.

    As example of use, this snippet will add some text above the topic editor. You add it into your child theme functions.php or into bp-custom.php

    
    function my_test_insert() {
    	echo '<strong>My awesome <a href="#">link</a> to third party app</strong>';
    }
    add_action( 'bbp_template_notices', 'my_test_insert' );

    If you don’t understand what’s going on on this topic, here’s a brief tutorial about hooks and filters.


    lmolenje
    Participant

    @lmolenje

    Thanks, that write is great. Do you have a similar one for creating a child template?

    Thanks again!


    danbp
    Moderator

    @danbp

    Do you have a similar one for creating a child template?

    No comprendo ?!!! Do you mean a tutorial for creating a child theme ?
    https://codex.wordpress.org/Child_Themes
    http://code.tutsplus.com/tutorials/child-themes-basics-and-creating-child-themes-in-wordpress–wp-27475

    Did you read both Codex articles ?

    Do you know that search engines exist ?


    lmolenje
    Participant

    @lmolenje

    Yes that is what I meant sorry. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Add a button to all topics’ is closed to new replies.
Skip to toolbar