Please or Register to create posts and topics.

Extend shortcode to show specific content only

Page 1 of 6Next

Version 1.4 of the Asgaros Forum plugin allows you to extend the forum-shortcode with additional parameters. When this parameters are used, only specific content will be shown on a page. This is especially interesting for websites where different categories/forums should be shown for different usergroups or languages. Here are a few examples on how to use it.

Show a specific post:

[forum post="POSTID"]

Show a specific topic:

[forum topic="TOPICID"]

Show a specific forum/sub-forum:

[forum forum="FORUMID"]

Show a specific category:

[forum category="CATEGORYID"]

Show multiple specific categories:

[forum category="CATEGORYID1,CATEGORYID2"]

Dont forget to replace the IDs with the corresponding IDs of the elements which should be shown on your page.

Important: Please use a forum-shortcode only once on a single page.

Eduardo, sebastopolys and 4 other users have reacted to this post.
EduardosebastopolysintrelisuporabnikThiago Santos de Moraesmgerzabek
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Good news and a lot of work!

Is it possible to show the shortcode for the forum on multiple pages?

Right now you have to select one page where the shortcode of the forum will be showed, but when I can show it on multiple pages I can easily add restrictions with my woocommerce memberships by show a category A when they have a “share” membership and show category B when they have a “support” membership.

I did try the shortcodes from woocommerce membership, because with these shortcodes you can also restrict content on a page, but the forum shortcode in another shortcode won’t work…

Greets Wilfred

Hello Wilfred,

yes it should work. Your problem sounds like a bug in the woocommerce-restrictions shortcode. You have to ensure that it allows you to run additional shortcodes inside the restriction-shortcode. I think the best way is to contact the plugin-author, maybe he can find a way to help you with this.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

I’m using Wishlist Member.  So, If I’m reading this correct – I can create a page with the shortcode (forum forum=“FORUMID”) and protect that page.  Would the forum navigation when loaded include other forums topics or categories? 

Hello livebold,

when you select the content via shortcode-parameters, no other content is shown. Only elements which are inside the selected content.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

When I use de shortcode on a different page then the page I did set in the options panel I see the forum, but without css style.

Greets Wilfred

Also all the links refer to the page which contains the original forum…

Hello Wilfred,

it is all working fine on my test-installations. Which theme are you using?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Hello,

it’s possible to insert more then one forum in a shortcode?

I tried

[forum forum="5,6"]

 but it doesnt, works.

Thank you very much.

Page 1 of 6Next