hitkid (@hitkid)

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

  • hitkid
    Participant

    @hitkid

    Never mind I totally understand what’s going on now! Again, thanks so much for the help 🙂 I wish there was something I could do to help out, but I don’t think you guys have a donate button


    hitkid
    Participant

    @hitkid

    @netweb content-single-forum.php was it!

    Turns out there is an “is not” bbp_is_forum_category() conditional statement that might be the reason it’s using that template.

    Is this meant to be like that? Here’s the Github paste of the conditional in content-single-forum.php

    Please also put a link where I can donate a bit of money to bbpress(if there is one)!

    Thank you so much 😀


    hitkid
    Participant

    @hitkid

    Thanks again @netweb

    Okay, I’m glad too see I wasn’t editing the wrong templates. I was paranoid that I was doing that. Unfortunately, this means something is going on with my archive-topics.php and content-archive-topics.php templates. The other two work great.

    What I’m trying to do is add things like: elements, classes, ids, functions I’ve built move around the functions already in the archive-topics.php and content-archive-topics.php templates and so on. When I do this and save changes they don’t appear.

    It doesn’t even look like my topic index is using the proper templates because in the content-archive-topics.php template file there is a search function that isn’t appearing in the topic index when I click on a topic off the forum index. eg home>forums>this-is-a-topic.

    Also you can create a topic on the topic index page in the website, but I can’t find a call to the form-topics template in any of the topic templates stated in the topic heiarchy. Unless it’s called in another way that’s not something like this:

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    What could be going on and why could this be ?

    Again I thank you for your help!


    hitkid
    Participant

    @hitkid

    @netweb Thank you very much! I will try this.

    The only thing I’m kind of left confused about is how the index for topics works? In the Amending bbpress templates codex entry it states the templates for forums work like this:

    The index for the forums starts by using

    content-archive-forum.php

    If you open this up you will see that it them calls a further template by using the function bbp_get_template_part

    <?php bbp_get_template_part( ‘loop’, ‘forums’ ); ?>

    (this translates to loop-forums.php)

    this in turn calls

    <?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>

    (this translates to loop-single-forum)

    and so on.

    So the template hierarchy for the the forums index would look like this:
    archive-forums.php>content-archive-forums.php>loop-forums.php>loop-single-forums.php

    Would the template hierarchy for the topics index look like this:
    archive-topics.php>content-archive-topics.php>loop-topics.php>loop-single-topics.php

    Thanks again for taking the time to help me!


    hitkid
    Participant

    @hitkid

    Thank you @robin-w for the great and speedy reply.

    I was just trying to remove the breadcrumb in the content-archive-topics.php template to test if that’s the file I’m suppose to edit. Really I want to rearrange and do a whole lot of different things. Like what it says in the Amending bbpress templates codex entry.

    Note* All the forum templates work great! Unlike the topic templates, any change I make to these files appears in the forum index as they should: archive-forums.php>content-archive-forums.php>loop-forums.php>loop-single-forums.php

    That’s a great entry in the codex.

    7. How can I remove all the breadcrumbs from the templates and set them at the top of the page?

    Moving around the breadcrum is more of what I want to do, but I can’t find the template file for the topics to add the <div class=”truebreadcrumbs”> to the bbp_breadcrumb(); to be able to use css to move it around. If that makes sense.

    Sorry if I’m being confusing and I thank you very much for your help 🙂


    hitkid
    Participant

    @hitkid

    thanks @robin-w !

    I’ve tried to use all the avatar functions found in the documentation in the wp_query(), but none are working. I’ve tried it locally with newer updates of buddypress/bbpress and live with a fresh install and nothing.

    This is the actual tag I want to use:
    <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>

    They work perfectly in the mychild/bbpress/loop-single-topic.php , but I just can not get it to work in the query! Is there anything I am missing, or doing wrong?

    Thanks for the help!

    In reply to: Mobile Theme?

    hitkid
    Participant

    @hitkid

    You could make your own with a child theme, or you could make an app with http://tapatalk.com/build.php I know that isn’t exactly what you’re looking for, but it may be something you want.


    hitkid
    Participant

    @hitkid

    *edit*
    I’ve tried all of the documentations functions*

    <?php $args = array( ‘post_type’ => ‘topic’, ‘posts_per_page’ => 10 );
    $the_query = new WP_Query( $args );?>
    
    <?php if ( $the_query->have_posts() ) : ?>
    
    <!– pagination here –>
    
    <!– the loop –>
    <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    <?php bbp_author_link( array( ‘post_id’ => bbp_get_forum_last_active_id(), ‘size’ => 32 ) ); ?>
    
    <a class=”bbp-topic-permalink” href=”<?php bbp_topic_permalink(); ?>” title=”<?php bbp_topic_title(); ?>”><?php bbp_topic_title(); ?></a>
    <?php endwhile; ?>
    <!– end of the loop –>
    
    <!– pagination here –>
    
    <?php wp_reset_postdata(); ?>
    
    <?php else: ?>
    <p><?php _e( ‘Sorry, no posts matched your criteria.’ ); ?></p>
    <?php endif; ?>

    hitkid
    Participant

    @hitkid

    @netweb

    I don’t need their role or title. For some reason the avatars will just not come up in the loop outside of the mychild/bbpress/loop-single-forum.php files and mychild/bbpress/loop-single-topic.php. So it works fine on index pages.

    I’ve tried all of the but nothing

    Here’s what the code looks like right now:

    <?php $args = array( 'post_type' => 'topic', 'posts_per_page' => 10 );
    			$the_query = new WP_Query( $args );?> 
    			
    <?php if ( $the_query->have_posts() ) : ?>
    
      <!-- pagination here -->
    
      <!-- the loop -->
      <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
       <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 32 ) ); ?>
    	
    	<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>" title="<?php bbp_topic_title(); ?>"><?php bbp_topic_title(); ?></a>
      <?php endwhile; ?>
      <!-- end of the loop -->
    
      <!-- pagination here -->
    
      <?php wp_reset_postdata(); ?>
    
    <?php else:  ?>
      <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    <?php endif; ?>

    This worked for getting the original post author, but I need the latest active poster to appear<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>

    Is there a wordpress function equivalent for this function: bbp_get_forum_last_active_id() that I can use with get_avatar() ?

    What file do these functions reside in? Maybe I could copy the functions out and make new ones in mychild/functions.php or see if something wrong and replace the file?

    Thank you for the help!


    hitkid
    Participant

    @hitkid

    Hey Stephen!

    Thanks so much for the help! 😀 I should’ve mentioned that I tried those already and they didn’t appear. It works with other bbpress functions, but just not the author avatar as you shared with the codex. I updated the version of bbpress. buddypress and wordpress that I am using to try and see if that worked and still nothing. The avatar shows just fine in the mychildtheme/bbpress/loop-single-topic. It shows up with the topic index shortcode. Any ideas as to what the problem is? I’m pretty confused as to what’s going on!

    Thanks again @netweb !


    hitkid
    Participant

    @hitkid

    Found it in the old bbpress twenty ten theme. Here it is for anyone who wants it.

    Insert this into your template where you want it.

      <?php do_action( 'bbp_template_notices' ); ?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<div id="topics-front" class="bbp-topics-front">
    						
    						<div class="entry-content">
    
    							<?php the_content(); ?>
    
    							<?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
    
    						</div>
    					</div><!-- #topics-front -->
    
    				<?php endwhile; ?>

    hitkid
    Participant

    @hitkid

    Sorry I meant to say recent topics.

Viewing 12 replies - 1 through 12 (of 12 total)