Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add create new topic button and….

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

  • jbdizzle
    Participant

    @jbdizzle

    I figured everything out except the post count. On the bbpress forum widget, I would like to have the post count next to the forum like this website has.


    jbdizzle
    Participant

    @jbdizzle

    I would also like to know how to change the color of the individual user roles.


    sina_mech
    Participant

    @sina_mech

    Hi 🙂 Can you please let me know that how you could add “create new topic” button?


    Robkk
    Moderator

    @robkk

    @sina_mech

    add this into your child themes functions.php file or put the snippet in a functionality plugin.

    function rk_new_topic_button() {
    	echo '<a href="#new-topic-0" class="bbp-new-topic-button button btn input[type="button"]" >New Topic</a>';
    }
    
    add_action('bbp_template_before_topics_loop','rk_new_topic_button');

    sina_mech
    Participant

    @sina_mech

    Thank you for your reply. I have “bbpress” folder in MY_THEME folder. I added a functions.php file in that bbpress folder, and inserted your code, and saved. but nothing happened 🙁 Am I doing it right?


    sina_mech
    Participant

    @sina_mech

    can you help me on this issue?


    Robkk
    Moderator

    @robkk

    @sina_mech

    why did you put a functions.php file in your bbpress folder it wouldnt work that way.

    just place it in your themes functions.php or use a plugin like this

    https://wordpress.org/plugins/functionality/


    sina_mech
    Participant

    @sina_mech

    At first I added it to the functions.php (in Theme folder), but nothing happened! That’s why I added it to another folder. However, I added it again to functions.php in theme folder, but no button so far 🙁


    sina_mech
    Participant

    @sina_mech

    OK! I made a mistake 🙂 It’s working now. Thank you very much.

    But is there any way that we can acquire the parent forum ID, and create a dynamic pop up or a new page to create topics?


    Robkk
    Moderator

    @robkk

    you can do new page.

    just create a new page in wordpress called new-topic or something.

    put the shortcode [bbp-topic-form] in it.

    then change my function to this instead.

    function rk_new_topic_button() {
    	echo '<a href="/new-topic/" class="bbp-new-topic-button button btn input[type="button"]" >New Topic</a>';
    }
    
    add_action('bbp_template_before_topics_loop','rk_new_topic_button');

    sina_mech
    Participant

    @sina_mech

    Thank you for your reply. The code you just suggested, shows the form in new page. Still users have to choose the parent forum, in which they would like to publish their topic. I was wondering if there is a way that like other forums, user can create the topic IN THE CURRENT FORUM by pishing the NEW TOPIC button at the corresponding forum (without any need to choose the destination forum in the form).


    Robkk
    Moderator

    @robkk

    @sina_mech

    if your looking for something custom post a job and maybe a developer would create this functionality for you.

    http://jobs.wordpress.net/


    kz1039
    Participant

    @kz1039

    I appreciate your reply. As it was not for me but I liked your action.


    TheDream18
    Participant

    @oanhtran1804

    Hello, Robkk @robkk

    I would like to use this code. But changed href="/new-topic/" to subscrible and favorite topic. Can you help please to change correct ID subscrible and favorited? I used id="subscription-toggle" but given me only text, whitout function

    function rk_new_topicaaa_button() {
    	echo '<span id="subscription-toggle" >
    		<span class="bbp-new-topic-subscription-toggle-button" > subscription-toggle</span>
    	</span>';
    }
    add_action('bbp_template_before_single_topic','rk_new_topicaaa_button');

    chinawapzy
    Participant

    @chinawapzy

    Thanks

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