Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Code Needed For Nested Replies


  • TKServer
    Participant

    @tkserver

    I’m trying to make my own nested threaded replies. Right now all the replies appear in my page, but there’s no organization to them. Is the $args method the way to go or do I need to make my own custom sql statement? I’ve got all the data in the args below, but the sort isn’t nested. Not sure how do do that.

    
    				$args = array(
    					'post_type' 		=> 'reply', // custom post type
    					'posts_per_page'    => '50',
    					'orderby' 		=> 'post_parent',
    					'post_parent' 		=> $topic_id,
    
    				     'meta_query' => array(
    				         'relation' => 'OR',
    					     array(
    					 	   'key'=> $topic_id,
    					    ),
    					    array(
    						   'key'=>'_bbp_reply_to',
    						   'compare' => 'NOT EXISTS'
    					   ),
    				         array(
    				             'key'=>'_bbp_reply_to',
    				             'compare' => 'EXISTS',
    				         ),
    				     ),
    					'orderby' => 'meta_value_num',
    				     'order' => 'ASC',
    				);
    
    					//global $wpdb;
    
    				$loopReply = new WP_Query($args);
    
Viewing 3 replies - 1 through 3 (of 3 total)

  • TKServer
    Participant

    @tkserver

    I believe I need to make either a custom reply Walker class, or a recursive function. How would I make a bbPress reply walker class and implement it?


    TKServer
    Participant

    @tkserver

    Hey @robin-w or any other BBP mods. I’m in dire need of I believe a custom walker for my custom page’s replies. I’m stumped to the point of wanting to hire someone to do it for me. Any ideas?


    TKServer
    Participant

    @tkserver

    I got it figured out and implemented.

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