<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									filter comment with custom field - How-to and Troubleshooting				            </title>
            <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/</link>
            <description>wpDiscuz WordPress Comment Plugin Community. Support and Resources.</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 16 Aug 2026 13:43:06 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12948</link>
                        <pubDate>Sat, 15 Jan 2022 14:36:49 +0000</pubDate>
                        <description><![CDATA[@asti 
 
Hi, I have fixed the problem. I am posting content for others to use.Your plugin caches comments, which is why our code does not work. Also, after writing the filter, it is necess...]]></description>
                        <content:encoded><![CDATA[<p>@asti </p>
<p> </p>
<p>Hi, I have fixed the problem. I am posting content for others to use.<br />Your plugin caches comments, which is why our code does not work. Also, after writing the filter, it is necessary to activate and deactivate the plugin once. The problem was solved by adding the following line of code.</p>
<p> </p>
<p> </p>
<pre contenteditable="false">add_action('pre_get_comments', function ($query)
{
    $query-&gt;query_vars = [
        [
            'key' =&gt; 'keyurl',
            'value' =&gt; "http://$_SERVER$_SERVER"
        ]
    ];
}, 10, 1);</pre>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>vahid13713</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12948</guid>
                    </item>
				                    <item>
                        <title>RE: filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12935</link>
                        <pubDate>Sat, 15 Jan 2022 06:43:28 +0000</pubDate>
                        <description><![CDATA[@asti 
 
Thank you very much for your answerI tested this code but it does not work. All comments are displayed!]]></description>
                        <content:encoded><![CDATA[<p>@asti </p>
<p> </p>
<p>Thank you very much for your answer<br />I tested this code but it does not work. All comments are displayed!</p>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>vahid13713</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12935</guid>
                    </item>
				                    <item>
                        <title>RE: filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12897</link>
                        <pubDate>Thu, 13 Jan 2022 11:41:43 +0000</pubDate>
                        <description><![CDATA[@vahid13713,
Please use this code: 
add_action(&#039;pre_get_comments&#039;, function ($queryObj) {
            $vars = $queryObj-&gt;query_vars;
            $vars = &#039;keytoopurl&#039;;
   ...]]></description>
                        <content:encoded><![CDATA[<p>@vahid13713,</p>
<p>Please use this code: </p>
<pre contenteditable="false">add_action('pre_get_comments', function ($queryObj) {
            $vars = $queryObj-&gt;query_vars;
            $vars = 'keytoopurl';
            $vars = 'y';
            $queryObj-&gt;query_vars = $vars;
    });</pre>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>Asti</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12897</guid>
                    </item>
				                    <item>
                        <title>RE: filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12890</link>
                        <pubDate>Thu, 13 Jan 2022 05:48:58 +0000</pubDate>
                        <description><![CDATA[@asti 
Hello asti and thank you very much for your answerI am a developer.I get the comment with the  get_comments() function and I want wpdiscuz to show only the comments I received. How c...]]></description>
                        <content:encoded><![CDATA[<p>@asti </p>
<p>Hello asti and thank you very much for your answer<br />I am a developer.<br /><br />I get the comment with the <span> </span><a href="https://developer.wordpress.org/reference/functions/get_comments/" target="_blank" rel="noopener">get_comments()</a> function and I want wpdiscuz to show only the comments I received. How can I do this?  Please provide me with a sample code </p>
<p> </p>
<p>my sample code:</p>
<pre contenteditable="false">    $comments20 = get_comments (array ('meta_key'=&gt; 'keytoopurl', 'meta_value'=&gt; 'y'));</pre>
<p>I want wpdiscuz to display only variable  comments20 </p>
<p> </p>
<p>How can I do this?</p>
<p> </p>
<p> </p>
<p>Thanks for your cooperation</p>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>vahid13713</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12890</guid>
                    </item>
				                    <item>
                        <title>RE: filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12882</link>
                        <pubDate>Wed, 12 Jan 2022 10:23:09 +0000</pubDate>
                        <description><![CDATA[vahid13713,
If you&#039;re a developers you can use the get_comments() and get_comment() functions. 
Also, we have plugin customization and custom addon development services at the gVectors Tea...]]></description>
                        <content:encoded><![CDATA[<p>vahid13713,</p>
<p>If you're a developers you can use the <a href="https://developer.wordpress.org/reference/functions/get_comments/" target="_blank" rel="noopener">get_comments()</a> and <a href="https://developer.wordpress.org/reference/functions/get_comment/" target="_blank" rel="noopener">get_comment() </a>functions. </p>
<p>Also, we have plugin customization and custom addon development services at the gVectors Team. They can assess the work and create it for you. Just contact us via salesgvectors.com email address and send a list of requirements you'd like to have.</p>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>Asti</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12882</guid>
                    </item>
				                    <item>
                        <title>filter comment with custom field</title>
                        <link>https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12880</link>
                        <pubDate>Wed, 12 Jan 2022 09:45:02 +0000</pubDate>
                        <description><![CDATA[Hello, How can I filter the comments displayed under a page based on a custom field? For example, if the custom field has a value of a, that comment should be displayed, and if it does not h...]]></description>
                        <content:encoded><![CDATA[<p>Hello, How can I filter the comments displayed under a page based on a custom field? For example, if the custom field has a value of a, that comment should be displayed, and if it does not have this value, it should not be displayed.</p>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/troubleshooting/">How-to and Troubleshooting</category>                        <dc:creator>vahid13713</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/troubleshooting/filter-comment-with-custom-field/#post-12880</guid>
                    </item>
							        </channel>
        </rss>
		