Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add create new topic button and….

  • @jbdizzle

    Participant

    Here is my froum: http://www.demigodlegion.com/?post_type=forum

    I would like to add a create new topic button on the main page and add a drop down once in that page that will allow me to select the forum to post in. I will also like to add the forum post count too like this site provides.

Viewing 15 replies - 1 through 15 (of 15 total)
  • @jbdizzle

    Participant

    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

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

    @sina_mech

    Participant

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

    @robkk

    Moderator

    @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

    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

    can you help me on this issue?

    @robkk

    Moderator

    @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

    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

    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

    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

    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

    @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

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

    @oanhtran1804

    Participant

    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

    Thanks

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