Skip to:
Content
Pages
Categories
Search
Top
Bottom

Topic and Forum archive


  • Sami Keijonen
    Participant

    @samikeijonen

    I have archive-topic.php in my theme and in that way I can have full control of how topic archive is shown. When using bbPress 2.2.4 this works like a charm but when I update to version 2.3 I basically don’t have that archive anymore.

    Any pointers which way to look?

Viewing 14 replies - 1 through 14 (of 14 total)
  • I was playing about with this earlier related to a different issue ttrying to recreate another bug but could not recreate the issue and have no problems using a custom `archive-topic.php` file in eg. `/wp-content/themes/twentytwelve/bbpress/`.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    This appears to be working for me, too.

    When you visit domain.com/topics, what happens?


    Sami Keijonen
    Participant

    @samikeijonen

    I let you know when I’m back on my computer. I’m on localhost and testing with WP 1.6 beta.


    Sami Keijonen
    Participant

    @samikeijonen

    Basically what happens “ or “ doesn’t return anything.


    Sami Keijonen
    Participant

    @samikeijonen

    There should be `the_excerpt()` or `the_content()` doesn’t return anything.

    Some screenshots and a link to your site would be quite helpful.


    Sami Keijonen
    Participant

    @samikeijonen

    For now I pulled back 2.2.4 on live site. I run some more tests what’s going on and let you know if I find anything.

    We are happy to help troubleshoot the issue with you it’s just difficult when ‘we’ can’t see what you are referring to.


    Sami Keijonen
    Participant

    @samikeijonen

    Yes naturally. But I don’t want to spend your time before I know is it theme issue or not. As you said if it’s working for you, it’s hardly a bbPress bug.


    Sami Keijonen
    Participant

    @samikeijonen

    Ok I recreated this issue with Twenty Twelve theme.

    I copied archive.php and renamed it archive-topic.php. I copied content-page.php and rename it content-topic.php. And I get what I want in url domain.com/topics. Here is screenshot, normal archive “page” with topic title/content using bbPress 2.2.4.

    https://dl.dropboxusercontent.com/u/11753008/Pysyvat/archive_2.2.4.jpg

    Then I update to version 2.3 and this is end result. No loop, no topic content.

    https://dl.dropboxusercontent.com/u/11753008/Pysyvat/archive_2.3.jpg

    I’m on WP 3.6-beta1-23997.


    Sami Keijonen
    Participant

    @samikeijonen

    Sorry to bump this up but have you find anything that is causing this. Because I haven’t.


    chuckingit
    Participant

    @chuckingit

    Hi – i’m experiencing similar strangeness as Sami in that my child theme on a multisite network shows the bbPress forums and topics great except when going to the default permalinks of forums and topics … in those cases, the forums go away and turn into a default blog page with the forums as psuedo excerpts appearing with page numbering at bottom – even a featured image gets inserted somehow to boot … none of the other site content gets mixed into this “blog page” – just all the forums run together without looking like forums (but like excerpts) and with no links to forums or topics …

    thus mydomain.com/forums = broken as is mydomain.com/topics … yet mydomain.com/forums/my-forum-01/ and/or mydomain.com/forums/my-forum-01/topic-01 are great …

    i tried rolling bbPress versions back to 2.2.1 and 2.2.4 but earlier versions have same effect as current 2.3.2 … and while i could create a hack by creating an archive-forum.php file and placing it in my child theme root (based off the archive-forum.php in the templates\defaults\extras folder) it lost a ton of info – e.g., the alerts like “the forum is empty” is gone as are the other alerts like “Oh bother! No topics were found here!” and ditto with the corresponding “Create a New Topic” form …

    actually in thinking about themes were bbPress works fine, part of me wonders why the create a topic form even shows on the default forums page – meaning, i have 14 forums and only two of them have test topics yet when looking at the /forums/ default page, it is asking me to create a new topic for forum #2 which is the first forum that is empty (note forum 1 and 3 have test content, forums 2, 4-14 are empty) … maybe that is fine but my point is still valid …

    thus with a theme that is having issues, the form and the alerts do not make it in my archive-forum.php file (even the css is a bit different) so i believe there is something fishy with topics and forums defaults that is getting in the way with some themes ..??.. note i tested this with Theme Hyrbrid Prototype and Twenty Twelve with no problem but with Theme Hybrid Shell Responsive Child theme is when my problems stemmed … and i know Sami has created some themes over at Theme Hybrid as well … thus i share his pain :>) (theme compat wise that is)

    thanks in advance for any pointers, insights, help that can be shared … cordially, chuck scott


    Cristian Antohe
    Participant

    @sareiodata

    What I did found is that in 2.3 the class .bbPress got transformed to .bbpress (notice the capital letter).

    What that meant was that my full width archive pages got transformed into two column ones, so my immediate thought was that bbPress broke support for archives in my theme.

    While I couldn’t replicate the above, perhaps it will help someone and it’s somewhat related to the symptoms.


    chuckingit
    Participant

    @chuckingit

    Hi – i just wanted to follow up with a recent workout of success in that David Chandra over at ThemeHybrid.com posted a thread that helped me greatly to get bbPress working 100% beautiful with my Shell child theme thus share as follows in case this helps …

    turns out that not only were my default forum and topics permalinks blown out, but also so were the author and topic tag defaults — meaning if i was in a forum and clicked a forum tag or a forum author, i would get a forum page that did not look like a forum but a generic blog post …

    so i ended up creating four custom child theme bbPress files and placed them in a bbpress sub directory off my child theme root … the four files were archive-forum.php, archive-topic.php, single-user.php, and taxonomy-topic-tag.php … i found that these four files worked if placed in my child theme root or if placed in my child theme bbpress sub folder but thought it best to keep in bbpress sub folder …

    the whole wierd bbPress create a topic form thing went away too given David Chandra’s approach … which was to use replace the child theme shell_get_atomic_template section with the bbp_get_template_part (see his example below) …

    BIG kudos to WP community of forums and those who share … viva the bb’s 🙂 cordially, chuck scott

    ==============
    From this post David Chandra wrote -> http://themehybrid.com/support/topic/shell-bug-with-bbpress-forum-index-page#post-79074

    you can just use bbp_get_template_part to replace shell_get_atomic_template.

    1. create archive-forum.php in child theme,
    2. copy the content of index.php from shell theme to your child theme
    3. change shell_get_atomic_template( ‘content’, true ); with bbp_get_template_part( ‘content’, ‘archive-forum’ );

    if you need to modify the default bbpress template bbpress content-archive-forum.php you can copy the files from wp-content\plugins\bbpress\templates\default\bbpress and add it in your child theme in bbpress folder.

    for example you can add it in your-child-theme/bbpress/content-archive-forum.php, you can copy and files in wp-content\plugins\bbpress\templates\default\bbpress in your child theme if you need to override it and load it using bbp_get_template_part(); function.

    i usually just copy everything to my child theme, but it’s not really future proof, since bbpress tend to delete/add new functions in every release, so full bbpress template override might broke your site. just override the template you need to modify.

    your archive-forum.php in your child theme may be something similar to this:

    
    <?php
    /**
     * bbPress Archive Forum Template
     */
    get_header(); // Loads the header.php template. ?>
    
    	<?php do_atomic( 'before_content' ); // shell_before_content ?>
    
    	<div id="content">
    
    		<?php do_atomic( 'open_content' ); // shell_open_content ?>
    
    		<div class="hfeed">
    
    			<?php do_atomic( 'open_hfeed' ); // shell_open_hfeed ?>
    
    			<?php if (!is_singular() ){ shell_get_atomic_template( 'loop-meta' ); } // atomic context template, in "loop-meta" directory  ?>
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
    
    				<?php endwhile; ?>
    
    			<?php else : ?>
    
    				<?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
    
    			<?php endif; ?>
    
    			<?php do_atomic( 'close_hfeed' ); // shell_close_hfeed ?>
    
    		</div><!-- .hfeed -->
    
    		<?php do_atomic( 'close_content' ); // shell_close_content ?>
    
    		<?php shell_get_atomic_template( 'loop-nav' ); // atomic context loop template, in "loop-nav" directory ?>
    
    	</div><!-- #content -->
    
    	<?php do_atomic( 'after_content' ); // shell_after_content ?>
    
    <?php get_footer(); // Loads the footer.php template. ?>
    
Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.
Skip to toolbar