Yukon Cornelius (@jimmmy)

Forum Replies Created

Viewing 18 replies - 1 through 18 (of 18 total)
  • Which part? Do you have the featured image showing on the parent? Client ended up ditching subforums, so not sure how i ended up solving this. If you can’t figure out the parent, i can try and find what i did…

    update: this was undesirable because the link to the reply was going to the reply itself, which is just a single post of the ‘reply’ custom post type. I have created this dodgy hack of the above code so the permalink for the replies is still the topic permalink. I’m sure there are a million better ways to do this, but it does the job for me so i thought i’d share the updated version.

    function jag_add_last_reply() { { 
     $jag_last_reply_id = bbp_get_forum_last_reply_id();
     $jag_last_topic_id = bbp_get_forum_last_topic_id();
    
    $new_args = array(
        'post_type'=> 'reply',
        'p' => $jag_last_reply_id
    );
    $post_title_args = array(
        'post_type'=> 'topic',
        'p' => $jag_last_topic_id
    );
    $other_args = array(
        'post_type'=> 'topic',
        'p' => $jag_last_topic_id
    );
    $jag_query = new WP_Query( $post_title_args );
    $nest_query = new WP_Query( $new_args );
    $another_nest_query = new WP_Query( $other_args );
    
       if ( $jag_query->have_posts() ) : while ( $jag_query->have_posts() ) : $jag_query->the_post();
         $this_post_id=$post->ID;
         $this_post_permalink= get_permalink(); ?>   
                                 
         <a href="<?php echo $this_post_permalink; ?>">
    
    <?php endwhile; 
       endif; wp_reset_query();
    
       if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_excerpt(); ?>
                                 
         <h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile;
    elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_excerpt(); ?>   
                                 
         <h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile; 
       endif; 
        }} 
    // Hook into action
    add_action('bbp_theme_after_forum_description','jag_add_last_reply');

    @yanseo thanks for the snippet. It works perfectly! Do you have any idea how i would change the code to add the thumbnail for sub forums instead?

    The forum index looks something like:

    PARENT FORUM
    *sub-1
    *sub-2
    *sub-3

    I attached a featured image to each sub forum. I would like those images to show where the asterisk is.

    I tried changing the action in your code to ‘bbp_theme_before_sub_forums’ but it still spits out the thumbnail/featured image for the Parent category.

    Any ideas?

    J

    I have the same problem. Any ideas yet???

    I have the same problem. Any ideas yet???

    Thanks Gautam. Is it safe to install 1.1 alpha? When will it be released? So it won’t work with Bechet 1.0.3 hey? Boohoo…

    Thanks Gautam. Is it safe to install 1.1 alpha? When will it be released? So it won’t work with Bechet 1.0.3 hey? Boohoo…

    ok, I solved it. somehow I’d corrupted the forum.php in my main forum directory. So glad I checked everything against the one in my original bbpress download. I’m not sure how that happened, must be late hour…

    Never stop grasping at straws!

    ok, I solved it. somehow I’d corrupted the forum.php in my main forum directory. So glad I checked everything against the one in my original bbpress download. I’m not sure how that happened, must be late hour…

    Never stop grasping at straws!

    Aahgh, man, I have tried everything. I just can’t get the forums to work. Can anyone think of a reason why the forums would stop working after making the above edit to forum.php and PERSIST even when I revert back to Kakumei???

    Aahgh, man, I have tried everything. I just can’t get the forums to work. Can anyone think of a reason why the forums would stop working after making the above edit to forum.php and PERSIST even when I revert back to Kakumei???

    In reply to: Hiding the Sub Forums

    @gunnsean thanks, I have the same problem as Jon. Does Private Forums just hide certain forums from view, or hide sub-forums from the home page?

    I am looking to do the latter. I then want to add the sub-forums to forum.php

    Any ideas how to do that?

    In reply to: Hiding the Sub Forums

    @gunnsean thanks, I have the same problem as Jon. Does Private Forums just hide certain forums from view, or hide sub-forums from the home page?

    I am looking to do the latter. I then want to add the sub-forums to forum.php

    Any ideas how to do that?

    @gerikg did you figure out how to show just the parent categories, and then the sub-categories on a separate page?

    thanks,

    J

    Well, I’m not having much luck. I’ve removed the “depth=1” which now puts the children in a list below the parent.

    That also seems to bring back the child class ‘bb-child’, so I’m able to indent the children so the list is at least readable. But most of my child / sub category lists are so long it is just a mess.

    See here: http://totallyadd.com/forum

    All I want to do is have a list of parent categories on the front page. When I click on a parent category, I should go to the list of children for that category. When I click on a child category, I should go through to the topics. That’s all.

    Can anyone point me towards the very basic steps I need to take to achieve this?

    Thanks in advance,

    Jimmmy

    Well, I’m not having much luck. I’ve removed the “depth=1” which now puts the children in a list below the parent.

    That also seems to bring back the child class ‘bb-child’, so I’m able to indent the children so the list is at least readable. But most of my child / sub category lists are so long it is just a mess.

    See here: http://totallyadd.com/forum

    All I want to do is have a list of parent categories on the front page. When I click on a parent category, I should go to the list of children for that category. When I click on a child category, I should go through to the topics. That’s all.

    Can anyone point me towards the very basic steps I need to take to achieve this?

    Thanks in advance,

    Jimmmy

    In reply to: emoticons question

    Thanks Ben. I couldn’t get bb-emoticons to work, but bb_smilies is working great.

    Cheers,

    Jimmmy

    In reply to: emoticons question

    Thanks Ben. I couldn’t get bb-emoticons to work, but bb_smilies is working great.

    Cheers,

    Jimmmy

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