AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] Topic Shortcode redirecting question

8 Posts
2 Users
2 Reactions
3,645 Views
Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@nolan59)
Active Member
Joined: 3 years ago
[#50014]

First post here so hi 😀 

I am busy converting my site to work on WPForo from SMF, so lot's of work ahead lol, but enjoying WPForo so far.

I have added this shortcode to a page : [wpforo item="topic" id="4"]

All is great, the topic shows on the page along with existing replies and  the editor to add a reply.

When you reply to the topic you are however returned to the topic on the Forum and now the page you replied on.

Is there a way to return the member back to the original page instead of bumping them back to the forum each time?

Thanks for the advice in advance.

wpForo Version
2.1.9
WordPress Version
6.2.2

7 Replies
Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@nolan59)
Active Member
Joined: 3 years ago

Seems like I am the only one adding a topic to an external page 😪 


Robert
Posts: 10729
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months ago

Posted by: @nolan59

When you reply to the topic you are however returned to the topic on the Forum and now the page you replied on.

Is there a way to return the member back to the original page instead of bumping them back to the forum each time?

Hi @nolan59,

Please read this topic, the shortcode pages are not a standalone forum pages, the shortcodes are only designed to display a certain topic not to create a separate forum: https://wpforo.com/community/postid/43746/


Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@nolan59)
Active Member
Joined: 3 years ago

Thank you for the reply Robert. I appreciate the help. 😀 

That's odd as embed topic shortcode also shows the user a reply box so you would think that the embedded topic would return the user back to the same page after a reply.

Do you think I could achieve that by using the

  • 'wpforo_after_add_post' - args: (array)$post, (array)$topic

hook?


1 Reply
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10729
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@nolan59,

The whole forum system is connected to the one root path /community/ or whatever you've changed it. This is like a tree, it can only have one root, there is no way to create root for each branch of the tree, you can display branches in different frames (pages) but you cannot cut it from the tree. So there is no way to have stand-alone working topic page. 

You can create a new tree (board) with its own root in a separate page. But this will be a fully separate forum with it's categories and topics.


Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@nolan59)
Active Member
Joined: 3 years ago

actually there is an easy way for it to work like this and all it will take is adding one or two lines of code to do it.

When the reply form is sent, Wordpress adds a hidden field called "_wp_http_referer" which contains the current page url. Wordpress uses this to do security checks.

The WPForo shortcode could also read this hidden field and use it to direct the user back to the page they were on instead of the forum topic as it currently does.

If there is anybody that knows the code and can point me to the file that processes the form, I could add the redirect into my forum's file.


Page 1 / 2
Share: