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

[Closed] make homepage show only resolved topics

10 Posts
4 Users
0 Reactions
2,102 Views
netvilox
Posts: 64
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
(@netvilox)
Estimable Member
Joined: 7 years ago
[#12380]

please how do i make my homepage show only resolved topics only. users can as well click on the the other buttons like newest and unsolved and popular. but when my homepageis reloaded i want it to show the resolved topics as the default.

 


9 Replies
netvilox
Posts: 64
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
(@netvilox)
Estimable Member
Joined: 7 years ago

What about this please


5 Replies
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
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

@netvilox,

I've just asked our developers and currently, I'm waiting for the response from them. I'll update the topic asap.

 


netvilox
(@netvilox)
Joined: 7 years ago

Estimable Member
Posts: 64
netvilox
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 OK thanks s million times

 


Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5774
Alvina
netvilox
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

@netvilox,

Below is provided a solution for Threaded layout:

1.Open the /wp-content/plugins/wpforo/wpf-themes/classic/layouts/4/forum.php file

2. Find the following code: 

<?php if( WPF()->forum->options['layout_threaded_filter_buttons'] ): ?>
<a class="wpf-threads-filter wpf-newest wpf-active" data-filter="newest" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Newest', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-clock"></i></a>
<a class="wpf-threads-filter wpf-hottest" data-filter="hottest" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Popular', false )) ?>" wpf-tooltip-position="top"><i class="fab fa-hotjar"></i></a>
<a class="wpf-threads-filter wpf-solved" data-filter="solved" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Resolved', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-check-circle"></i></a>
<a class="wpf-threads-filter wpf-unsolved" data-filter="unsolved" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Unsolved', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-times-circle"></i></a>
<?php endif; ?>

3. replace with this one:

<?php if( WPF()->forum->options['layout_threaded_filter_buttons'] ): ?>
<a class="wpf-threads-filter wpf-solved wpf-active" data-filter="solved" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Resolved', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-check-circle"></i></a>
<a class="wpf-threads-filter wpf-newest " data-filter="newest" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Newest', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-clock"></i></a>
<a class="wpf-threads-filter wpf-hottest" data-filter="hottest" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Popular', false )) ?>" wpf-tooltip-position="top><i class="fab fa-hotjar"></i></a>
<a class="wpf-threads-filter wpf-unsolved" data-filter="unsolved" wpf-tooltip="<?php echo esc_attr(wpforo_phrase( 'Unsolved', false )) ?>" wpf-tooltip-position="top"><i class="fas fa-times-circle"></i></a>
<?php endif; ?>

Please don't forget to use the update-safe way for the customization.  Instruction is here: https://wpforo.com/docs/root/forum-themes/theme-customization/


netvilox
(@netvilox)
Joined: 7 years ago

Estimable Member
Posts: 64
netvilox
Alvina
netvilox
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

@sofy

There are many filed in the folder you mentioned above please specify. 

 

 

 Screenshot 20200229 184825

Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5774
Sofy
netvilox
Alvina
netvilox
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

Sorry @netvilox,

The post above is just updated. Please check it.

 


netvilox
Posts: 64
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
(@netvilox)
Estimable Member
Joined: 7 years ago

@sofy

I tested the above code on local host but It didn't work. I saw the code on layout/4/forums

The resolved icon is highlighted but the topics it shows is the recent topics. see screenshots below.

And the trending topics icon is gone. 

Screenshot 20200229 203503
Screenshot 20200229 203745

1 Reply
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10718
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

@netvilox,

That's good. Now you should change the default thread loading logic.

1. Edit the copied layouts/4/forum.php file in your active theme folder and find this line:

$args = array( 'row_count' => WPF()->forum->options['layout_threaded_intro_topics_count'], 'forumids' => $child_forums, 'orderby' => 'type, modified', 'order' => 'DESC' );

2. Change it to this and save:

$args = array( 'row_count' => WPF()->forum->options['layout_threaded_intro_topics_count'], 'forumids' => $child_forums, 'orderby' => 'type, modified', 'solved' => 1, 'order' => 'DESC' );

 


netvilox
Posts: 64
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
(@netvilox)
Estimable Member
Joined: 7 years ago

Thanks you very much @sofy and @Robert.

Actually I don't want all the topics created to show on the homepage. So after adding the above code I changed the name on phrases from 'solved'  to 'move to homepage'. Now only the topic I want will be shown on the homepage. 

Thank once again to the Wpforo team.


Share: