Notifications
Clear all

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

12 Posts
3 Users
5 Likes
872 Views
Posts: 27
Topic starter
(@michelacosta)
Eminent Member
Joined: 3 years 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.

11 Replies
Posts: 27
Topic starter
(@michelacosta)
Eminent Member
Joined: 3 years 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
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@michelacosta,

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

(@michelacosta)
Joined: 3 years ago

Eminent Member
Posts: 27

@chris worked like a charm, thanks!

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@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)
Joined: 3 years 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
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@michelacosta

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

Posts: 1
(@hertman)
New Member
Joined: 2 years 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
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@hertman,

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

(@michelacosta)
Joined: 3 years 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
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@michelacosta,

(@michelacosta)
Joined: 3 years ago

Eminent Member
Posts: 27

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

Thanks for the info, will use it next time