Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  •  AlamSyed
    Participant

    The coding I did:

    COPY CODE
    /**
    	 * Adding aditional meta for responsive design
    	 *
    	 * @since Snow 1.4
    	 */
    	public function head_metas()
    	{
    		// Kleo Works header
    		get_header(); 
    		//create right sidebar template
    		kleo_switch_layout('right');
    		get_template_part('page-parts/general-title-section');
    		get_template_part('page-parts/general-before-wrap');
    		
    		$this->output('<meta name="viewport" content="width=device-width, initial-scale=1"/>');
    		parent::head_metas();
    	}
    COPY CODE
    /**
    	 * Footer in full width bottom bar
    	 *
    	 * @since Snow 1.4
    	 */
    	public function footer()
    	{
    		$this->output('<div class="qam-footer-box">');
    
    		$this->output('<div class="qam-footer-row">');
    		$this->widgets('full', 'bottom');
    		$this->output('</div> <!-- END qam-footer-row -->');
    
    		parent::footer();
    		$this->output('</div> <!-- END qam-footer-box -->');
    		
    		// Kleo Works footer
    		get_template_part('page-parts/general-after-wrap'); 
    		get_footer(); 
    		
    	}
    in reply to: Clicking on a forum shows posts from other forums #102001
     AlamSyed
    Participant

    Just for additional details I am using code to add into the forum. I can get the parent child relations between the forums displayed properly, the insertion of the topic goes to the right parent forum. But then that bug shows up.

    COPY CODE
    if (!function_exists('bbp_insert_topic')) {
    				require_once '/includes/topics/functions.php';
    			}
    			
    			echo "All fine here ??? Did it reached ";
    			$forum_ID = $selectmyID;
    			$terms = array(bbp_get_topic_tag_tax_id() => $key_pieces);
    			// The topic data.
    			$topic_data = array(
    			'post_parent' 		=> $forum_ID, // forum ID of Projects  hard coded
    			'post_status'       => bbp_get_public_status_id(),   // Subscribed users can see this
    			'post_content'		=> $my_content,
    			'post_title' 		=> $slug,
    			'comment_status' 	=> 'open',
    			'menu_order' 		=> 0,
    			'tax_input'		    => $terms  
    			);
    			
    			// The topic meta.
    			$topic_meta = array(
    			'forum_id'    => $topic_data['post_parent'],
    			'reply_count' => 0
    			);
    			
    			// NOTICE! Understand what this does before running.
    			$post_id = bbp_insert_topic($topic_data, $topic_meta);
    			bbp_stick_topic($post_id , true);                         // Making it super sticky !
    			
    		 
    			echo "The post id returned is " . $post_id;
    			echo "Sucessfully inserted the post" . $slug . " programmatically !!!!";
Viewing 2 posts - 1 through 2 (of 2 total)

Log in with your credentials

Forgot your details?