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

[Solved] Chatbox on forum page

12 Posts
3 Users
1 Reactions
2,619 Views
Posts: 51
 guts
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
(@guts)
Trusted Member
Joined: 2 years ago
[#51086]

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
Tutrix
Posts: 1519
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
(@tutrix)
Noble Member
Joined: 6 years ago

@guts 

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


1 Reply
 guts
(@guts)
Joined: 2 years ago

Trusted Member
Posts: 51
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

@tutrix It works but how to put it between 2 categories?
I mean, I don't want it on the top of the page.

Thanks.

 

Posts: 51
 guts
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
(@guts)
Trusted Member
Joined: 2 years ago

Also, it looks weird on my forum, can you please tell me if you encountered this issue or help me?

WiseChat is stuck to my first category.

 

wisechat

BlackRaz
Posts: 396
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
(@blackraz)
Contributor
Joined: 9 years ago

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


1 Reply
 guts
(@guts)
Joined: 2 years ago

Trusted Member
Posts: 51
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

@blackraz Thanks for your reply.

Which template should I edit, please?

I am having difficulty comprehending the CSS issues as I am currently using the default template. :/


BlackRaz
Posts: 396
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
(@blackraz)
Contributor
Joined: 9 years ago

You should use the Snippets Plugin for custom PHP codes 

https://wordpress.org/plugins/code-snippets/


1 Reply
 guts
(@guts)
Joined: 2 years ago

Trusted Member
Posts: 51
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

@blackraz I installed and added your code, but my forums disappeared.
Could you please provide me with step-by-step instructions?

 


Page 1 / 2
Share: