Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Query to display sticky posts only

Viewing 3 replies - 1 through 3 (of 3 total)
  • @mvaneijgen

    Participant

    Did you found anything?

    @_az_

    Participant

    There is a function: bbp_get_super_stickies() which is used inside the function bbp_has_topics(). This function basically returns a list of Post IDs from the wp_options table from a row with the key: “_bbp_super_sticky_topics” or “_bbp_sticky_topics”

    So one approach could be: override default args

    bbp_has_topics(array('show_stickies' => false);

    Extra loop for stickys (not tested, just a sketch)

    $query = new WP_Query(array('inlucde' => bbp_get_super_stickies());

    Though i recommend looking into the function bbp_has_topics to be aware of all possible cases.

    @_az_

    Participant

    update: replace ‘include’ with ‘post__in’ and then its a loop just with super-stickies

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar