Notifications
Clear all

wpForo 1.x.x [Solved] Shortcode not working for inserting a topic

12 Posts
3 Users
5 Likes
580 Views
michelacosta
Posts: 27
Topic starter
(@michelacosta)
Eminent Member
Joined: 1 year ago

Hi there,

I'm trying to insert at the end of this page one of my topics (id = 17378)

I'm using this shortcode:

[ wpforo item="topic" id="17378" ]

But what appears on the page is the main page of my forums.

If I try for example this shortcode...

[ wpforo item="topic" id="1" ]

...it works correctly and it inserts the firs of my topics.

wpForo Version
1.9.9.1
WordPress Version
5.8.2
7.4.24
5.7.35-cll-lve
Topic Tags
11 Replies
michelacosta
Posts: 27
Topic starter
(@michelacosta)
Eminent Member
Joined: 1 year ago

This is the topic that should appear:

https://michelacosta.com/messi-vs-cristiano/foro/general/balon-de-oro-2021/#post-17378

I guess the id is what we see at the end of the querystring

5 Replies
Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2350

@michelacosta,

Try [ wpforo item="topic" slug="balon-de-oro-2021" ]

michelacosta
(@michelacosta)
Joined: 1 year ago

Eminent Member
Posts: 27

@chris worked like a charm, thanks!

Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2350

@michelacosta,

I guess you used the post ID not the topic ID in the shortcode, that was the problem why the shortcode didn't work.

michelacosta
(@michelacosta)
Joined: 1 year ago

Eminent Member
Posts: 27

@chris probably! I took the id from the url and it must be the post id. Where can i see the topic id?

Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2350

@michelacosta

For topics better to use slug, not ID, to get reed of unexpected issues 

Hertman
Posts: 1
(@hertman)
New Member
Joined: 1 year ago
Posted by: @chris

For topics better to use slug, not ID, to get reed of unexpected issues 

Hmm...I've always used IDs and hadn't have any issues either.

4 Replies
Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2350

@hertman,

Unexpected issue is that users use wrong ID's` post, forum, category IDs in the shortcode for topics.

michelacosta
(@michelacosta)
Joined: 1 year ago

Eminent Member
Posts: 27

@chris i was looking for something like a topic id, everywhere, and couldn't find it. I only see that post id in the url.

Can you tell me where to find that topic id? Would be helpful for the future.

I guess there must be a place to find this id without having to go to the database directly.

Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2350

@michelacosta,

michelacosta
(@michelacosta)
Joined: 1 year ago

Eminent Member
Posts: 27

@chris wow... not so user-friendly xD

Thanks for the info, will use it next time