Notifications
Clear all

[Solved] Display Add Topic Button on Forum List

6 Posts
3 Users
2 Likes
177 Views
seancallahan
Posts: 34
Topic starter
(@seancallahan)
Trusted Member
Joined: 6 months ago

Is there a way to add an "Add Topic" button on the main home page for a forum in an Extended Layout like you can all the other layouts? For example, the Simplified layout has an option in Settings called "Display Add Topic Button on Forum List" but Extended Layout doesn't have it. Any idea how to do this?

5 Replies
Chris
Posts: 2405
Admin
(@chris)
Support Team
Joined: 1 year ago

@seancallahan,

That's why wpForo has 4 layouts, you can change to another layout by your need. 

2 Replies
seancallahan
(@seancallahan)
Joined: 6 months ago

Trusted Member
Posts: 34

@chris what layout would be like Expanded View with an Add Topic button on the home page?

Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2405

@seancallahan,

Try Threaded layout.

Tutrix
Posts: 829
(@tutrix)
Noble Member
Joined: 3 years ago

@seancallahan

if you need the button and function, you can edit the forum.php from layout 1

search for

	<div class="wpforo-category" <?php echo $cover_styles['cover'] ?>>
        <div class="wpforo-cat-panel" <?php echo $cover_styles['blur'] ?>>
            <div class="cat-title" title="<?php echo esc_attr($cat['description']); ?>">
                <span class="cat-name" <?php echo $cover_styles['title'] ?>><?php echo esc_html($cat['title']); ?></span>
            </div>
            <div class="cat-stat-posts" <?php echo $cover_styles['info'] ?>><?php wpforo_phrase('Posts'); ?></div>
            <div class="cat-stat-topics" <?php echo $cover_styles['info'] ?>><?php wpforo_phrase('Topics'); ?></div>
            <br class="wpf-clear" />
        </div>
	</div><!-- wpforo-category -->

and replace with

	<div class="wpforo-category" <?php echo $cover_styles['cover'] ?>><div class="wpforo-cat-panel" <?php echo $cover_styles['blur'] ?>>
            <div class="cat-title" title="<?php echo esc_attr($cat['description']); ?>">
                <span class="cat-name" <?php echo $cover_styles['title'] ?>><?php echo esc_html($cat['title']); ?></span>
            </div>
             <?php if( WPF()->current_object['template'] === 'forum' ) wpforo_template_add_topic_button($cat['forumid']); ?>
            <div class="cat-stat-posts" <?php echo $cover_styles['info'] ?>><?php wpforo_phrase('Posts'); ?></div>
            <div class="cat-stat-topics" <?php echo $cover_styles['info'] ?>><?php wpforo_phrase('Topics'); ?></div>           
            <br class="wpf-clear" />
        </div>
	</div><!-- wpforo-category -->
    <?php if( WPF()->current_object['template'] === 'forum' ) wpforo_template_topic_portable_form($cat['forumid']); ?>

read this before making changes > Theme Customization

1 Reply
seancallahan
(@seancallahan)
Joined: 6 months ago

Trusted Member
Posts: 34

@tutrix Thank you, that changed worked. 😀