Hey guys, so I try to add a tracking code into the post topic button to know when a user actually post something trough Active Campaign. Into wpforo/wpf-themes/classic/index.php I found the add topic button that is at the top right of the forums pages, but I'm looking for the one that is at the very end of the topic box editor that open when you click it. Cannot find it.
So I look into all the .php in the /classic/ and cannot find where is the "add topic" button so I can add my tracking code on it ><.
Is it any way that can be achieved?
HiΒ @lesly,
You need to use theΒ function topic_form($forumid)Β functionΒ inΒ wp-content/plugins/wpforo/wpf-includes/class-template.phpΒ file.Β Β
However, we don't recommend to changeΒ the function, all changes will be lost during the upgrade process.
You can use the hooks for this purpose:Β
e.g.
add_action('wpforo_editor_topic_submit_after', 'YOUR_CUSTOM_FUNCTION_NAME');
Hey Sofy, sweet, thanks for the answer. I guess I cannot just putΒ /wpf-includes/class-template.php in my child theme and make the change directly in the code without using the hook?
Hi @lesly,
Yes, you're right, you cannot put the /wpf-includes/class-template.php file in your child theme. You need to use hooks for this purpose.Β