Home › Forums › Backend Issues (wp-admin) › Filter from Taxonomy issue.
I have a set of content_modules all categorized using the module_type taxonomy. In this case, the taxonomy values are Business Card, Contact Module, and Page Manager.
On another post type, I’ve setup a custom field to select a relationship with all “content_module” Post Types, with Filter from Taxonomy set to “Business Card”. On the post type with the custom fields, I see the relationship box for Business Card, but none of my posts with that taxonomy value are showing up. If I set Filter from Taxonomy to all, all of my “content_module” posts show up.
I have set the hierarchy to true for the module_type taxonomy and have confirmed that the content_module posts I’d like to see do have that taxonomy value set.
I am also seeing the same problem if I set the Field Type to Post Object.
Is there something I’m missing?
Hi @marcgetter
Have you set the custom taxonomy using the right method? Could you please share the custom post type and taxonomy code? Also, could you please share the JSON or XML export of your field group?
Thanks!
I’m using CPT UI to create the post types and taxonomies. I can send you the post and field details when I get in tomorrow morning.
– Marc
@acf-support James,
Here’s the code for the custom fields used on the rep_page post type:
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!– This is a WordPress eXtended RSS file generated by WordPress as an export of your site. –>
<!– It contains information about your site’s posts, pages, comments, categories, and other content. –>
<!– You may use this file to transfer that content from one site to another. –>
<!– This file is not intended to serve as a complete backup of your site. –>
<!– To import this information into a WordPress site follow these steps: –>
<!– 1. Log in to that site as an administrator. –>
<!– 2. Go to Tools: Import in the WordPress admin panel. –>
<!– 3. Install the “WordPress” importer from the list. –>
<!– 4. Activate & Run Importer. –>
<!– 5. Upload this file using the form provided on that page. –>
<!– 6. You will first be asked to map the authors in this export file to users –>
<!– on the site. For each author, you may choose to map to an –>
<!– existing user on the site or to create a new user. –>
<!– 7. WordPress will then import each of the posts, pages, comments, categories, etc. –>
<!– contained in this file into your site. –>
<!– generator=”WordPress/4.4.2″ created=”2016-03-02 12:55″ –>
<rss version=”2.0″
xmlns:excerpt=”http://wordpress.org/export/1.1/excerpt/”
xmlns:content=”http://purl.org/rss/1.0/modules/wp-content/”
xmlns:wfw=”http://wellformedweb.org/CommentAPI/”
xmlns:dc=”http://purl.org/dc/elements/1.1/”
xmlns:wp=”http://wordpress.org/export/1.1/”
>
<channel>
<title>IBM Digital Sales</title>
<link>http://mtev2.w3-969.ibm.com/dswp</link>
<description>Just another WordPress site</description>
<pubDate>Wed, 02 Mar 2016 12:55:41 +0000</pubDate>
<language></language>
<wp:wxr_version>1.1</wp:wxr_version>
<wp:base_site_url>http://mtev2.w3-969.ibm.com/dswp/</wp:base_site_url>
<wp:base_blog_url>http://mtev2.w3-969.ibm.com/dswp</wp:base_blog_url>
<wp:author><wp:author_id>1</wp:author_id><wp:author_login>admin</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[admin]]></wp:author_display_name><wp:author_first_name><![CDATA[Marc]]></wp:author_first_name><wp:author_last_name><![CDATA[Getter]]></wp:author_last_name></wp:author>
<item>
<title>Rep Page</title>
<link>http://mtev2.w3-969.ibm.com/dswp</link>
<pubDate>Fri, 26 Feb 2016 14:50:53 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid isPermaLink=”false”>http://127.0.0.1:8888/Wordpress/?post_type=acf&p=31873</guid>
<wp:post_id>31873</wp:post_id>
<wp:post_date>2016-02-26 14:50:53</wp:post_date>
<wp:post_date_gmt>2016-02-26 14:50:53</wp:post_date_gmt>
<wp:comment_status>closed</wp:comment_status>
<wp:ping_status>closed</wp:ping_status>
<wp:post_name>acf_rep-page</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>acf</wp:post_type>
<wp:post_password></wp:post_password>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_56d065540d115</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:”key”;s:19:”field_56d065540d115″;s:5:”label”;s:5:”eMail”;s:4:”name”;s:5:”email”;s:4:”type”;s:4:”text”;s:12:”instructions”;s:0:””;s:8:”required”;s:1:”1″;s:13:”default_value”;s:0:””;s:11:”placeholder”;s:0:””;s:7:”prepend”;s:0:””;s:6:”append”;s:0:””;s:10:”formatting”;s:4:”html”;s:9:”maxlength”;s:0:””;s:17:”conditional_logic”;a:3:{s:6:”status”;s:1:”0″;s:5:”rules”;a:1:{i:0;a:3:{s:5:”field”;s:4:”null”;s:8:”operator”;s:2:”==”;s:5:”value”;s:0:””;}}s:8:”allorany”;s:3:”all”;}s:8:”order_no”;i:0;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_56d065750d116</wp:meta_key>
<wp:meta_value><![CDATA[a:13:{s:3:”key”;s:19:”field_56d065750d116″;s:5:”label”;s:6:”Locale”;s:4:”name”;s:6:”locale”;s:4:”type”;s:8:”taxonomy”;s:12:”instructions”;s:0:””;s:8:”required”;s:1:”1″;s:8:”taxonomy”;s:6:”locale”;s:10:”field_type”;s:12:”multi_select”;s:10:”allow_null”;s:1:”0″;s:15:”load_save_terms”;s:1:”1″;s:13:”return_format”;s:2:”id”;s:17:”conditional_logic”;a:3:{s:6:”status”;s:1:”0″;s:5:”rules”;a:1:{i:0;a:3:{s:5:”field”;s:4:”null”;s:8:”operator”;s:2:”==”;s:5:”value”;s:0:””;}}s:8:”allorany”;s:3:”all”;}s:8:”order_no”;i:1;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_56d0661b0d117</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:”key”;s:19:”field_56d0661b0d117″;s:5:”label”;s:9:”Page Name”;s:4:”name”;s:9:”page_name”;s:4:”type”;s:4:”text”;s:12:”instructions”;s:0:””;s:8:”required”;s:1:”1″;s:13:”default_value”;s:0:””;s:11:”placeholder”;s:0:””;s:7:”prepend”;s:0:””;s:6:”append”;s:0:””;s:10:”formatting”;s:4:”html”;s:9:”maxlength”;s:0:””;s:17:”conditional_logic”;a:3:{s:6:”status”;s:1:”0″;s:5:”rules”;a:1:{i:0;a:3:{s:5:”field”;s:4:”null”;s:8:”operator”;s:2:”==”;s:5:”value”;s:0:””;}}s:8:”allorany”;s:3:”all”;}s:8:”order_no”;i:2;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>position</wp:meta_key>
<wp:meta_value><![CDATA[normal]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>layout</wp:meta_key>
<wp:meta_value><![CDATA[default]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>hide_on_screen</wp:meta_key>
<wp:meta_value><![CDATA[]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_56d0908f54d73</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:”key”;s:19:”field_56d0908f54d73″;s:5:”label”;s:13:”Business Card”;s:4:”name”;s:13:”business_card”;s:4:”type”;s:12:”relationship”;s:12:”instructions”;s:0:””;s:8:”required”;s:1:”0″;s:13:”return_format”;s:2:”id”;s:9:”post_type”;a:1:{i:0;s:14:”content_module”;}s:8:”taxonomy”;a:1:{i:0;s:13:”module_type:4″;}s:7:”filters”;a:1:{i:0;s:6:”search”;}s:15:”result_elements”;a:1:{i:0;s:9:”post_type”;}s:3:”max”;s:0:””;s:17:”conditional_logic”;a:3:{s:6:”status”;s:1:”0″;s:5:”rules”;a:1:{i:0;a:2:{s:5:”field”;s:4:”null”;s:8:”operator”;s:2:”==”;}}s:8:”allorany”;s:3:”all”;}s:8:”order_no”;i:3;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>rule</wp:meta_key>
<wp:meta_value><![CDATA[a:5:{s:5:”param”;s:9:”post_type”;s:8:”operator”;s:2:”==”;s:5:”value”;s:8:”rep_page”;s:8:”order_no”;i:0;s:8:”group_no”;i:0;}]]></wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>
This is the CPT UI export for my content types:
{“content_module”:{“name”:”content_module”,”label”:”Content Modules”,”singular_label”:”Content Module”,”description”:””,”public”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”10″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:””,”supports”:[“title”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit”:””,”edit_item”:””,”new_item”:””,”view”:””,”view_item”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent”:””},”custom_supports”:””},”rep_page”:{“name”:”rep_page”,”label”:”Rep Pages”,”singular_label”:”Rep Page”,”description”:””,”public”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”5″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:””,”supports”:[“title”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit”:””,”edit_item”:””,”new_item”:””,”view”:””,”view_item”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent”:””},”custom_supports”:””},”account_page”:{“name”:”account_page”,”label”:”Account Pages”,”singular_label”:”Account Page”,”description”:””,”public”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”10″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:””,”supports”:[“title”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit”:””,”edit_item”:””,”new_item”:””,”view”:””,”view_item”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent”:””},”custom_supports”:””}}
This is the CPT UI export for my taxonomies:
{“locale”:{“name”:”locale”,”label”:”Locales”,”singular_label”:”Locale”,”description”:””,”hierarchical”:”false”,”show_ui”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”false”,”rest_base”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””},”object_types”:[“post”]},”module_type”:{“name”:”module_type”,”label”:”Module Types”,”singular_label”:”Module Type”,”description”:””,”hierarchical”:”true”,”show_ui”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”false”,”rest_base”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””},”object_types”:[“post”]},”account”:{“name”:”account”,”label”:”Accounts”,”singular_label”:”Account”,”description”:””,”hierarchical”:”false”,”show_ui”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”false”,”rest_base”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””},”object_types”:[“post”]}}
If you need more, let me know.
Thanks!
– Marc
Hi @marcgetter
I’m afraid I couldn’t import the code to my installation due to the formatting issue. Could you please share it in a file instead of pasting it to the textbox?
Thanks!
James,
I appreciate your help and patience with this.
I added the ACF code in an xml file as well as text files of the CPT UI export text for the post types and taxonomy.
I’ve also setup a test site on another server with just this scenario setup if you’d like to login and look.
I couldn’t find a way to PM you to send the connection information.
– Marc
Hi @marcgetter
Thanks for the export files.
I’ve just tested it, and the relationship field was working as it should be. Please make sure that you’ve selected the taxonomy on the module types meta box too. I’ve attached a screenshot for your reference.
If you want the taxonomy in the meta box selected automatically, please enable the “Load & Save Terms to Post” option. I’ve attached another screenshot for your reference.
If you want to share your credentials, you can set your answer visibility to private.
I hope this helps.
Thanks, James for all your help. It was the checkbox that did it. I added that and it magically started working properly.
The topic ‘Filter from Taxonomy issue.’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.