Making a comment system

Hello,

I wanted to know if on each ad page we could make a comment system where people can write about the ad?

Thanks

Please try to use the HivePress Reviews extension HivePress Reviews – WordPress plugin | WordPress.org

Hello, yes but the reviews serve as an opinion for the seller, I would really like a specific comment section for each listing

I would like a comment system on each article where people can talk to each other and make offers (without buying on the site)

Please try this PHP snippet but please note that it can require further customizations

add_filter(
	'hivepress/v1/post_types',
	function( $post_types ) {
		$post_types['listing']['supports'][] = 'comments';

		return $post_types;
	}
);

add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_content' => [
						'blocks' => [
							'listing_comments' => [
								'type'     => 'callback',
								'callback' => 'comments_template',
								'_order'   => 100,
							],
						],
					],
				],
			]
		);
	}
);
1 Like


So it is still not possible to write a comment.

The person has to write a review, and that becomes a comment. Is it possible to remove the review function, and put only the comments

I would like to get rid of the notices and a comment + reply system

Unfortunately there’s no simple solution if you want to use both, Reviews and the code snippet for adding comments because reviews are also comments (with an extra rating field). There are 2 possible solutions:

  • Using comments only
  • Using reviews only, and make the Rating optional

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.