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

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] How to copy the forum title as a tag in all of it's topics (for thousands of topics)?

4 Posts
2 Users
1 Reactions
1,320 Views
Posts: 127
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
(@mplusplus)
Reputable Member
Joined: 6 years ago
[#12316]

Hi there

How to copy the forum title as a tag in all of the topics in that forum? 
Need to do that in thousands of topics.
E.g. all topics in "community/electric-cars" forum should get a tag "electric cars".

Thanks.


3 Replies
Alvina
Posts: 1857
Moderator
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
(@alvina)
Member
Joined: 7 years ago

Hi @mplusplus,

The first way is editing each topic and add "electric cars" as a tag.

I'll ask the developers if there is another easy way to do it. I'll update the topic as soon as possible.


Alvina
Posts: 1857
Moderator
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
(@alvina)
Member
Joined: 7 years ago

Please follow to these steps below:

1. Go to Dashboard > Plugins and Install "SQL Executioner" plugin.

2. Navigate to Tools > SQL Executioner, put this SQL in Query Textarea and click on Execute SQL button:


UPDATE `wp_wpforo_topics` t

INNER JOIN `wp_wpforo_forums` f ON f.`forumid` = t.`forumid`

SET t.`tags` = 'electric cars'

WHERE NOT t.`tags`

AND f.`slug` LIKE 'electric-cars'; INSERT IGNORE `wp_wpforo_tags` ( `tag`, `count` )

SELECT 'electric cars', COUNT(*)

FROM `wp_wpforo_topics`

WHERE FIND_IN_SET('electric cars', `tags`);

The red marked value can be changed.

Also please note: the "electric-cars" your forum slug.

The "electric cars" the tag name.

3.Navigate to the Dashboard > Forums > Dashboard admin page click on "Delete all caches" button.
4.Go to the frontend page press CTRL+F(5)twice before checking.


1 Reply
(@mplusplus)
Joined: 6 years ago

Reputable Member
Posts: 127
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

@alvina Thanks so much 🙂

 


Share: