jshultz (@jshultz)

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well this is the way I ended up doing it. I created a new div above the table that lists the topics and then did me up some jquery:

    var rows = $('table.bbp-topics').find('tr.super-sticky');
    
            rows.each(function(index) {
                var headhref = $('a.bbp-topic-permalink', this).attr('href');
                var headline = $('a.bbp-topic-permalink', this).html();
                var excerpt = $('.excerpt', this).text();
                var author = $('a.bbp-author-name', this).html();
                var photo = $('a.bbp-author-avatar > img', this).attr('src');
                var replies = $('.bbp-topic-voice-count', this).text();
                var followers = $('.bbp-topic-reply-count', this).text();
                var freshness = $('.bbp-topic-freshness > a', this).html();
                var meta = $('p.bbp-topic-meta', this).text();
    
    
                var newrow = '' +
                    '' +
                    '' + author +' ' +
                    '<a href="' + headhref + '">' + headline + '</a><a></a>' +
                    '' + excerpt + '' +
                    'Replies' + replies + ' ' +
                    'Followers' + followers + ' ' +
                    'Updated' + freshness + ' ' +
                    ' ';
    
                $('#supersticky').fadeIn().append(newrow)
    
            })
    

    I found the problem. I had a function in my functions.php was malformed. The correct way was this way:

    // Add classes to posts
    add_filter('post_class', 'my_post_classes');
    function my_post_classes( $classes )
    {
        $postType = get_post_type();
    
        if ( $postType == 'post' ) {
            $classes[] = 'clearfix';
    
        }
    
        return $classes;
    }
    

    This would be better:

    add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' );
    
    add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' );
    
    function ja_return_blank() {
    
        return '';
    
    }
    

    I just noticed that all kinds of classes aren’t being applied to the individual topic rows? Looking at the same page using live preview I see the following classes were applied: post-2019 topic type-topic status-publish hentry odd super-sticky bbp-parent-forum-1998 user-id-1.

    Whereas in my child theme I have exactly no classes applied.

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