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

[Closed] I want the number of questions for all forums

6 Posts
2 Users
3 Reactions
1,161 Views
tqarb
Posts: 45
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
(@tqarb)
Trusted Member
Joined: 5 years ago
[#17231]

Hello I have deleted the people who are online now from the forum stats in the footer
And I added this instead

<?php wpforo_print_number(wpfval(WPF()->current_object['user'], 'questions'), true) ?>

But I want the number of questions for all forums
What is the correct code?


5 Replies
tqarb
Posts: 45
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
(@tqarb)
Trusted Member
Joined: 5 years ago

i have add

<?php echo wpforo_print_number($stat['questions']) ?>

but not working


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

Questions & Answers layout
forum.php

<div class="wpforo-forum-stat-questions"><?php echo wpforo_print_number($counts['topics']) ?></div>
<div class="wpforo-forum-stat-answers"><?php echo wpforo_print_number(WPF()->topic->get_sum_answer($data)) ?></div>
<div class="wpforo-forum-stat-posts"><?php echo wpforo_print_number($counts['posts']) ?></div>

try this one

<?php echo wpforo_print_number($counts['topics']) ?>

1 Reply
tqarb
(@tqarb)
Joined: 5 years ago

Trusted Member
Posts: 45
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 thank you so much but it didn't work


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

@tqarb

It was worth a try 😉 

I don't use the Questions & Answers layout,
therefore unfortunately cannot test it


tqarb
Posts: 45
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
(@tqarb)
Trusted Member
Joined: 5 years ago

Thank you for trying to help me 🌹 
I will look for other solutions


Share: