• Resolved jowo

    (@jowo)


    I have a bit of on issue with taxonomies not updating.

    Running latest WP/Pods I created a custom post type and a taxonomy. In this I added relationships to this taxonomy and it shows up in the “More fields” column as a selectbox.

    I can select and save it and the value will persist. But when i go into the taxonomy view it says count is 0.

    However if I add the taxonomy as a column and check a checkbox it will properly bind the relationship together.

    So why does it not work in the dropdown under “More fields” column, only in standalone column?

    What did I miss? I even tried bi-directional relationship, but then it cries when I change the value in the dropdown and says it is required…

    https://www.ads-software.com/plugins/pods/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    You don’t need a “Relationship” field. What you want is under Advanced Options in your custom post type’s pod edit screen. Look at the “Associated Taxonomies” checkboxes and check the ones you want to show in the edit screen.

    Thread Starter jowo

    (@jowo)

    It is associated already.

    But I want the taxonomy to be a dropdown in the “More fields” column (or any other column as long as it is a dropdown) and not a column with checkboxes (as per default).

    Plugin Contributor Jim True

    (@jimtrue)

    Custom Taxonomies (and the default Taxonomies) are handled & displayed in the default way by WordPress.

    If you need the drop-down select list, then I’d suggest creating a CPT and creating a relationship field to that CPT. If you need the Taxonomy to update with the count of records assigned to that Taxonomy and to display a filtered list of records when using the WordPress taxonomy templates, you need to Associate it like a regular taxonomy and use the WordPress interface for Taxonomies. We don’t provide an override for that field interface, though a plugin may exist for that.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    You might want to try something like this, if you want to override the default WordPress metabox for the taxonomy and have it use a dropdown instead:

    https://github.com/WebDevStudios/Taxonomy_Single_Term

    The versatile custom fields of pods would greatly increase the versatility of how one could associate taxonomies to post types and therefore display a filtered list of records. I would like to use an autocomplete field rather than radio or dropdown fields. I would like to know if the following options of doing this are possible and which is the best:

    Option 1

    Check the required taxonomies in Associated Taxonomies under Advanced Options in the custom post type’s pod edit screen.
    Hide the default WordPress taxonomy meta-boxes using Adminimize.
    Use pods’ custom relationship fields and relate to the taxonomies.
    …This is the code I need advice and help to implement…
    Read the data from the pods’ taxonomy relationship fields.
    Inject the data into the hidden default WordPress taxonomy meta-boxes i.e. where the data is traditionally saved in the db
    -Read and inject the taxonomy data as the post type is saved.

    Option 2

    Create taxonomies with custom fields related to the post types.
    Create post types with custom fields related to the taxonomies.
    -Bidirectional relationship between the post types and taxonomies.
    -No default WordPress association between the post types and taxonomies.
    …This is the code I need advice and help to implement…
    Read the data on related post types from the taxonomy relationship fields.
    Display links to the post types on the taxonomy page.

    Plugin Contributor Jim True

    (@jimtrue)

    @4mkdouglas We missed this because you tacked onto a resolved issue. In the future, please always create a new ticket.

    I believe we addressed this in our Slack Chat. I’m not a fan of creating relationships to taxonomy just to override the ‘display’ of the form input. It goes against the actual use of the field (ie if you need a relationship, you use a relationship field, you don’t use it just because you want a drop-down select list).

    We have created an issue specifically to address people wanting to override the display of their taxonomies in Pods:

    https://github.com/pods-framework/pods/issues/3469

    You can track progress against it there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Taxonomy relationship not updating’ is closed to new replies.