Notifications
Clear all

[Solved] Display Add Topic Button on Forum List

6 Posts
3 Users
2 Reactions
1,242 Views
Posts: 61
Topic starter
(@seancallahan)
Estimable Member
Joined: 2 years 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: 3627
(@chris)
Famed Member
Joined: 3 years ago

@seancallahan,

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

2 Replies
(@seancallahan)
Joined: 2 years ago

Estimable Member
Posts: 61

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

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

@seancallahan,

Try Threaded layout.

Tutrix
Posts: 1455
(@tutrix)
Noble Member
Joined: 5 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)
Joined: 2 years ago

Estimable Member
Posts: 61

@tutrix Thank you, that changed worked. 😀