Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Custom forum homepage

4 Posts
2 Users
1 Reactions
387 Views
Posts: 2
Topic starter
(@crystal742)
New Member
Joined: 11 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: 5486
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 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: 11 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: 8 years ago

Support Team
Posts: 5486

@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