XF 2.2 Custom home page

Ricsca

Well-known member
Is there a way to create a home page that only shows the latest posts posted in the forum instead of the various nodes?

And also the latest articles and the latest photos from the Gallery.

Thank you
 
Solution
When you want to add widgets just access them with the widget key that you entered when creating a widget. I used this:

Code:
<xf:widget key="latest_movies" />

Just change the key part and add that code where you want the widget to appear. The rest of the HTML will be easy if you're familiar with it, if not then I can give you a few pointers if you tell me what you want to do :)
You can change the index route filter in 'Basic Options' to this:
1683629183066.webp

Your home page will be all the latest posts and replies that have occurred since a member's last visit.
 
OK then you will need to create a page for that and then add widgets to it. Something like the home pages I have on my sites - these are made as pages with some HTML added and custom CSS but the widgets are very easy to add. Take a look at my movie site, link in my signature.
 
When you want to add widgets just access them with the widget key that you entered when creating a widget. I used this:

Code:
<xf:widget key="latest_movies" />

Just change the key part and add that code where you want the widget to appear. The rest of the HTML will be easy if you're familiar with it, if not then I can give you a few pointers if you tell me what you want to do :)
 
Solution
One example with <xf:widget key="latest_movies" />?
Thanks
Hit my site... you can see an example of what he's talking about... I'm just starting implementing it there.

An example widget:

Screen Shot 2023-06-17 at 7.16.46 PM.png
The created template HTML in the Page node.
I changed the latest posts to the latest threads. They don't show the same information so you have to decide which is more important to you.


Screen Shot 2023-06-17 at 7.17.07 PM.png

As for creating a home page... there is a resource here for that.
 
Last edited:
Errr... they don't "show as a forum".. they are a widget that links to the posts of them.

Screen Shot 2023-06-18 at 3.39.58 AM.png

As for what widget you would use, if wanting "new posts" then I'd use that widget.

Screen Shot 2023-06-18 at 3.37.59 AM.png

If latest threads (topics)... then again, choose the correct widget.

Screen Shot 2023-06-18 at 3.39.07 AM.png

They are two separate things... posts simply show the latest posts.. threads show the latest threads, apparently irrespective of post content, based simply on when the thread was started.
 
Found... I have it by default..
whats_new_new_posts
You may not want to use the "default" ones as they are set up for the forum use... I create additional ones that are specific for use on the portal, that way they don't interfere with the "basic" ones for the main forum.

Screen Shot 2023-06-18 at 3.44.34 AM.webp
 
I managed to make the customized page, I just need to finish putting the "Post Threads..." button at the top right
Honestly.... for my landing page, I probably would not put anything to do with posting new content.. you really want to bring attention to the content itself, and then the users can click on something they are interested in and go from there. To add a "post threads" button is going to take a lot more template customization than you may be comfortable with. And as in my landing page.. it deals with a LOT more than simple threads/posts, so it would be rather cumbersome to link to creating each type of content shown.
 
What a simple home page should have is the News page with the right widgets.
The problem is that if you set the default xf last thread page to registered users it shows only unread messages and therefore most of the time they find the home page empty.
 
Really? I don't think so.... I use the "latest threads" widget and am logged in.. guess what I see.
Why would you want to force it to "registered users"? By default, if logged in it shows the latest for the registered users... if not logged in then the most recent posted.

Screen Shot 2023-06-18 at 4.15.28 AM.png

There is a difference between the "Whats New" page and using widgets to provide the information.

If you want to show the "what's new" page that is built in, then point your route index at it.
 
Top Bottom