Support

Account

Home Forums ACF PRO Querying Comments with Custom Fields

Unread

Querying Comments with Custom Fields

  • Hello,

    I discovered that I could add taxonomies to comments and while I think that WP doesn’t actually allow for comments to have taxonomies in the way posts do, I would still like to be able to query ACF fields (and the taxonomy field) in page.

    How could I do this? I have so far gotten as far as:

    Where $tax_id is my taxonomy type and $tags is an array of taxonomies.

    $args = array(
      		    'meta_query' => array(
      		        array(
                      'key' => $tax_id,
     		              'value' => $tags,
     		              'compare' => 'IN'
      		        )
      		    )
      		 );
      		$comment_query = new WP_Comment_Query( $args );
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.