Skip to:
Content
Pages
Categories
Search
Top
Bottom

Content not showing on using custom template


  • MilliR
    Participant

    @millir

    I am using forums.php as my custom template to modify bbpress. I copied content of archive-forum into it and modified it a bit. Thing is, the forum lists shows up as expected. But no topic or list of topics is shown on following the links. This is all I get.

    Oh bother! No forums were found here!

    Using the default page.php gives no problem.

    Here’s the code for forums.php

    <?php
    
    /**
     * bbPress - Forum Archive
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    get_header(); ?>
    <div id="main-content">
    	<div id="millir-header-feat">
    		<div class="container">
    			<h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1>
    		</div>
    	</div>
    	<div class="container">
    	<div id="content-area" class="clearfix">
    		<div id="left-area">
    			<?php do_action( 'bbp_before_main_content' ); ?>
    
    			<?php do_action( 'bbp_template_notices' ); ?>
    
    			<div id="forum-front" class="bbp-forum-front">				
    				<div class="entry-content">
    
    					<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
    
    				</div>
    			</div><!-- #forum-front -->
    
    			<?php do_action( 'bbp_after_main_content' ); ?>
    		</div>
    		<?php get_sidebar(); ?>
    	</div>
    	</div>	
    </div>
    <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • bbPress will use that forum.php file as a wrapper template for all of bbPress pages and that is most likely what the issue is.

    I’d suggest if you need a wrapper template to work with your theme you copy the contents of your themes page.php to a file named bbpress.php.

    Then copy any bbPress templates you want to customize to your themes folder.

    See these for more info on copying bbPress templates and child themes:

    Functions files and child themes – explained !


    https://codex.bbpress.org/theme-compatibility/


    MilliR
    Participant

    @millir

    Where to copy the files?

    Should I copy the files in /mytheme/bbpress or in /mytheme/ itself? Currently, I have copied all files to /mytheme/bbpress and facing same issue.

    You copy the files to /mytheme/bbpress as stated in the links above.

    You also should change your template as I suggested above, that is the primary cause of your issue I think.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar