AI Search
Classic Search
Notifications
Clear all
Jan 25, 2024 12:00 am
Hello,
I would like to position the chatbox between two categories on the forum page.
I already have the code to insert into the functions.php file:
function my_chat_function(){
do_shortcode( '[wise-chat]' );
}
add_action('wpforo_top_hook', 'my_chat_function', 10);
However, the chatbox doesn't appear; perhaps I edited the wrong functions.php file.
Any assistance would be greatly appreciated.
11 Replies
Jan 25, 2024 8:57 am
You have to edit the forum.php (2022 Theme)
the code looks like this
<?php if (function_exists('wise_chat')) { wise_chat(array('Channel1','Channel2','Channel3')); } ?>
use your channel
Jan 25, 2024 5:00 pm
Hi @guts
add_action( 'wpforo_loop_hook', function( $key ){
if( $key === 0 ){
apply_shortcode('[wise-chat]');
}
});
Try this hook: the $key is a index of the forums current iteration.
For the styling you should write the CSS codes for solving the website css conflicts
Jan 25, 2024 7:04 pm
You should use the Snippets Plugin for custom PHP codes
https://wordpress.org/plugins/code-snippets/
Page 1 / 2
Next
