• Resolved Gustavo Tadeu

    (@gtsantos)


    Hi.

    I have created a CPT and 2 custom taxonomies for it.

    I have setup all things as usual.

    But at this time the taxonomy URL does not retrieve posts list. Instead: nothing found.

    Can you please help me?

    {"corpo-clinico":{"name":"corpo-clinico","label":"Profissionais","singular_label":"Profissional","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"true","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail","custom-fields"],"taxonomies":["especialidade","convenio"],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":""}}

    {"especialidade":{"name":"especialidade","label":"Especialidades","singular_label":"Especialidade","description":"","public":"true","publicly_queryable":"true","hierarchical":"true","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"1","show_admin_column":"true","show_in_rest":"true","show_tagcloud":"true","show_in_quick_edit":"true","rest_base":"","rest_controller_class":"","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":"","no_terms":"","items_list_navigation":"","items_list":"","back_to_items":""},"meta_box_cb":"","default_term":"","object_types":["corpo-clinico"]},"convenio":{"name":"convenio","label":"Conv\u00eanio","singular_label":"Conv\u00eanios","description":"","public":"true","publicly_queryable":"true","hierarchical":"true","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"true","show_in_rest":"true","show_tagcloud":"false","show_in_quick_edit":"","rest_base":"","rest_controller_class":"","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":"","no_terms":"","items_list_navigation":"","items_list":"","back_to_items":""},"meta_box_cb":"","default_term":"","object_types":["corpo-clinico"]}}

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Checking on some things, but for some reason it doesn’t look like the post type associated is being considered with that term archive query. Same thing is happening for me locally on my own install.

    Thread Starter Gustavo Tadeu

    (@gtsantos)

    So do you have any tip to fix it?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Let me have a chance to do some researching and a touch of trial/error for this, and I’ll get back to you as soon as I can.

    Thread Starter Gustavo Tadeu

    (@gtsantos)

    Ok, friend!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thank you for your patience with this. I have done some googling and found a StackOverflow link that discusses this. I have linked to it at the end of my reply here.

    The short answer here is that because you set “exclude from search” to true for the post type, that is affecting it from being included in the query for the taxonomy term archive. I do not know the reasoning for this from WordPress core, but once I set “exclude from search” to false, the post was showing up in the queries like expected.

    If you really want the post type to not be able to be found when searched, we can provide some snippets to exclude it from consideration when actually performing a search, and still allow it to be included with the taxonomy archive. It’ll just be a slightly separate process to achieve that.

    Link if you’re curious.
    https://wordpress.stackexchange.com/a/223557/1006

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Taxonomy page not showing posts’ is closed to new replies.