Support » Plugin: Asgaros Forum » in posts, how how to link the forum?

  • Resolved yellofish


    Just wondering, in a blog post, what is the proper way to link to the forum?

    I have a category BLOG, Asgaros is creating the forum topic automatically.

    When I put this code at the blog post’s bottom: [forum topic =”3″]

    I get the right forum, but the initial blog post is repeated as first forum post.

    I guess I’m not doing it the correct way. Or?

    And how do get the Post ID anyway?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Asgaros


    Hello @yellofish

    Asgaros Forum is not a plugin which should replace your comment-system.

    I guess you disabled comments and want to use forum-topics for discussing about a blog-post. So you have to create a link at the bottom of your post which links to this topic.

    You can do this manually or use the transition_post_status hook to let WordPress do this automatically. In this case you have to disable the automatic topic-creation for new posts and re-implement this in an extended way by yourself.

    Here is the base-code which some ideas:

    public function createBlogTopic($new_status, $old_status, $post) {
        if ($post->post_type == 'post' && $new_status == 'publish' && $old_status != 'publish') {
            $forumID = $this->options['create_blog_topics_id'];
            $post_title = apply_filters('asgarosforum_filter_automatic_topic_title', $post->post_title, $post);
            $post_content = apply_filters('asgarosforum_filter_automatic_topic_content', $post->post_content, $post);
            if ($this->content->forum_exists($forumID)) {
                $ids = $this->content->insert_topic($forumID, $post_title, $post_content, $post->post_author);
                // What you have to do here:
                // - Update the text of the blog-post
                // - You should be able to find the ID of the blog-post in the $post variable
                // - Insert a link to the end of the blog-post which points to the topic.
                // You can create the link as follows:
                $link = ''.$ids->topic_id;
    add_action('transition_post_status', 'createBlogTopic', 10, 3);

    So you are saying I do not use the [forum **** =”#”] format and rather use a link, such as, i.e.

    I don’t really use Asgaros yet, just some testing, so I am more inclined to use it the way it was intended.

    This said, I do plan to disable comments and use Asgaros instead. Best on the same page, but looking at all options.

    Plugin Author Asgaros


    Yes, exactly.

    Of course you can use the shortcode on every page but as I sayed its not the purpose of the plugin to replace the comment-section of blog-posts (the initial post will always be visible, there are other functionalities which dont belong to a comment-area, etc).

    Aside of the fact that you have to add a shortcode to every page anyway for its topic I would just add a link to the corresponding forum-topic which makes things much more easy and less error-prone (because of an out-of-scope behavior).



    its not the purpose of the plugin to replace the comment-section of blog-posts

    No need to replace the WP comment function. That can be simply disabled anyway 😉

    But it would be great if one could use Asgaros in a similar way. Have a simple comment like structure below posts, with a simpler forum Asgaros interface. All comments go to the Asgaros DB and are easier to read and replied to. Easier to jump to other blog post topics.

    And for those that don’t think it’s good, they can still stick with the WP comment system.

    That’s all what’s on my Christmas wishlist.

    Plugin Author Asgaros


    I will take it into consideration for a future enhancement, but I guess it will not come in the very near future because it requires a lot of under-the-hood changes.

    Luckily you didnt tell me on which years Christmas wishlist it is. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘in posts, how how to link the forum?’ is closed to new replies.