Notifications
Clear all

New Feature [Solved] Please consider "Recent Posts" link/button at the top

4 Posts
2 Users
2 Reactions
351 Views
ffooccuuss
Posts: 21
Topic starter
(@ffooccuuss)
Eminent Member
Joined: 7 months ago

Forgive me if this has come up before, we are relatively new to WPForo. The forum application we had before had a link in the top menus called "Activity" which went directly to the recent posts. In WPForo the only way to get to recent activity is that link at the bottom of the page. It would be very useful to also have that link at the top. 

I will add a redirect for my users so when they log in they will be redirected to the recent posts page, but many of my users never log out. So it would be useful to have that feature readily available at the top. 

Also, semi-related, it would be nice to have a 'jump to top' feature at the bottom of the page for long topics with many posts so users didn't have to manually scroll up. 

TIA!

(Edit: Sorry, I think I posted in the wrong forum! Moderators please move as appropriate!)

3 Replies
VereK
Posts: 522
(@verek)
Honorable Member
Joined: 7 years ago

You can add /%wpforo-recent%/ to your wpForo menu easily enough - and name the menu item whatever you like.

If you are adept at file edits you can also add it to the forum feed div ribbon in /wpforo/wpf-themes/2022/forum.php. Something along lines replacing the code below <div class="wpforo-feed"> (approx Line 5 to Line 14) with

 <span class="wpf-stat-recent-posts"><a href="<?php echo esc_url( wpforo_home_url( wpforo_settings_get_slug( 'recent' ) ) ) ?>"><i class="fas fa-list-ul"></i> <span><?php wpforo_phrase( 'Recent Posts' ) ?></span></a> |
		  <span class="wpf-unread-posts">
                <a href="<?php echo esc_url( wpforo_home_url( wpforo_settings_get_slug( 'recent' ) . '?view=unread' ) ) ?>">
                    <i class="fas fa-layer-group" style="padding-right: 1px; font-size: 13px;"></i> <span><?php wpforo_phrase( 'Unread Posts' ) ?></span>
                </a>
            </span>|
		 <span class="wpf-all-read"><?php wpforo_mark_all_read_link() ?></span>
         <?php wpforo_feed_link( 'home' ) ?>
        </div>
    </h1>

 Your Wordpress theme should have a "back to the top" function built in.

2 Replies
ffooccuuss
(@ffooccuuss)
Joined: 7 months ago

Eminent Member
Posts: 21

@verek - Well, I am NOT adept at code but I do have a staging site where I can be experimental and try things out. Put another way - I am a master at copy and paste! 

So after a few attempts at getting the lines right I did get it to work. Looks great! That is what I was looking for. Many thanks!

VereK
(@verek)
Joined: 7 years ago

Honorable Member
Posts: 522

@ffooccuuss 

Good job on having a staging site; it's how most of us learn how to fix things or mod software to our liking.

Remember, this edit will disappear when a wpForo update comes out so you have two choices, keep a list of your core edits that need to be done and apply them again when the plugin is updated or make a "child theme" https://wpforo.com/docs/root/forum-themes/theme-customization/