Notifications
Clear all

[Solved] Display Add Topic Button on Forum List

6 Posts
3 Users
2 Likes
523 Views
Posts: 42
Topic starter
(@seancallahan)
Trusted Member
Joined: 1 year 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
Posts: 3653
Admin
(@chris)
Support Team
Joined: 2 years ago

@seancallahan,

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

2 Replies
(@seancallahan)
Joined: 1 year ago

Trusted Member
Posts: 42

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

Admin
(@chris)
Joined: 2 years ago

Support Team
Posts: 3653

@seancallahan,

Try Threaded layout.

Tutrix
Posts: 1082
(@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)
Joined: 1 year ago

Trusted Member
Posts: 42

@tutrix Thank you, that changed worked. 😀