Notifications
Clear all

Custom forum homepage

4 Posts
2 Users
1 Reactions
188 Views
Posts: 2
Topic starter
(@crystal742)
New Member
Joined: 7 months ago

I created a new homepage template using this function per another thread I found on here:

function wpforo_page_show_courses( $template ){
   if( $template == 'courses' ){...}

add_action( 'wpforo_page', 'wpforo_page_show_courses', 10 );

I want to use this as my homepage for the forum. I have added it in the menu and point to this page but I was wondering how I can set this as the default homepage so when going back from the profile page the "forum home" will redirect to my custom forum homepage instead and other URLs I might miss.

 
Also hoping to get a better slug as the page url is currently displayed like this ".../community/?wpforo=page&view=courses". I'm okay with keeping the current home page as "community" and having my custom homepage have a different URL but I am open to any suggestions! Thank you!
3 Replies
Sofy
Posts: 5235
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi,

For further support, we'll need more information. Please provide additional details about the function—what it is designed for, what page it's used on, and what that page includes, etc.

Reply
2 Replies
(@crystal742)
Joined: 7 months ago

New Member
Posts: 2

@sofy essentially in the wpforo_page_show_courses():

 if$template == 'courses' ){ custom HTML & PHP to display relevant info }

I was creating a custom homepage to display certain users, topics and more information about the courses. I was hoping to make it my homepage but I decided to use the custom html to override the main forum.php page that pulls all forums and move the forums to a different page since I feel that will be used less frequently, assuming this is possible in my child theme.

Thanks for reviewing! 

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5235

@crystal742 

You should use the add_shortcode() function and include it in the code for the homepage you're creating.

I'd also recommend purchasing pro support and reaching out to the support team for integration:  https://wpforo.com/pro-support/#plugin-support

Reply