Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show only Super Sticky or Sticky posts Above forum list

  • @jshultz

    Member

    I would like to be able to show Super Sticky or Sticky posts above the forum posts. In other words. I’ll have posts on the page and the super/sticky posts will be there. However, above the lists of the posts, I would like to have the super/sticky posts there as well. Sort of like a “Featured Discussions” type section.

Viewing 1 replies (of 1 total)
  • @jshultz

    Member

    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)
    
            })
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar