• Resolved WidiGMX

    (@widigmx)


    First of all, I’m very excited about the PODS framework and thank you very much for all the work you put into it.
    Now to my problem – possibly a solution has already been described, but I have not found them or I used the wrong search terms.
    We want to use multiple relationship fields in a custom post type which references all the same custom taxanomy. If one of the custom posts is edited, these custom fields are shown correctly. However, the right sidebar shows also a tagcloud widget (I hope the term “tagcloud widget” is correct here) where we could select the terms of the custom taxonomy. But this selection is not associated with any of the data fields of the current post entry.

    So, is it possible to display a tagcloud widget for each of the relationship fields (and syncronize their content)?
    Or, on the other hand, is it possible to hide the tagcloud widget – because it is confusing if its selection does not fit?

    Regards
    Friedbert

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @widigmx

    The tagcloud widget isn’t part of Pods so I assume your theme shows this widget.
    You can remove it in the Widgets admin page.

    For a list of currently linked taxonomies/relationships you could use a Pods Single Item widget and use your own Pod template to display.
    More info:
    https://docs.pods.io/displaying-pods/pods-templates/
    https://docs.pods.io/displaying-pods/magic-tags/
    – Video: https://docs.pods.io/videos/grow-beyond-posts-pages-introduction-pods-framework/

    Cheers, Jory

    Thread Starter WidiGMX

    (@widigmx)

    Ohh – I forget to mention that I talk about the input form in the backend (Admin UI) – sorry.
    We use custom post types (Pods) to store the master data of our workers or products. The problem described above occurs when we edit one of these items in the backend (admin UI).

    An example: We have specified the following data structure.

    • A taxanomy “CustTaxColors” with the items { Black, Blue, Gold, Green, Red, White, Yellow }.
    • A custom post type “CustPostFlags” with two custom fields “Flag Colors”, “Other Colors”, where both references the taxanomy “CustTaxColors” (multiple select).

    Now we use the admin dashboard to create a new entry of “CustomPostFlags”. The section “More Fields” shows the two fields (“Flag Colors”, “Other Colors”) where we can choose the items of the taxanomy. But there is also a single widget named “CustTaxColors” on the sidebar where we can select the items using checkboxes. The selection within this widget is not related to the data of the data fields. That’s confusing!

    Is it possible to hide this widget in the admin UI?
    Or is it possible to use two of these tagcloud widgets instead of the simple input fields.

    Regards,
    Friedbert

    Plugin Contributor Bernhard Gronau

    (@quasel)

    Hi,

    the widget you are talking about is the default wordpress interface when you assign a taxonomy to a CPT – if you don’t use the default WordPress way just unassigned it – https://pods.io/docs/build/how-to-associate-a-post-type-with-a-taxonomy/

    Guess that solves this issue than ??

    Bernhard

    Thread Starter WidiGMX

    (@widigmx)

    Thanks for the hint. Yes, that already works partionally. The tagcloud widget in the admin interface disappears. But, unfortunately, the menu entry at the previously associated post type also disappears.

    Example: We have a Custom Post Type “person” (label.singular=”Person”, label.plural=”Personen”).
    Then we defined a taxonomy “ausbildung” (label.singular=”Ausbildung”, label.plural=”Ausbildungen”). To each person we want to assign several educations (qualifications). We want to sort the order of the educations for each person according to their priorities. Therefore, we do not use the taxonomy as an associated taxonomy, but as a relationship data field with multiple selection, where we can change the order.

    Until now, the admin menu shows the menu item “Personen” with the submenu item “Ausbildungen” to edit this taxonomy. That disappeared now too.

    Now I have tried to use the options “Admin UI” of the taxonomy “ausbildung” to place this menu entry again under the menu item “Personen”. But unfortunately unsuccessfully.
    If I set Menu Name=”Ausbildungen” and Menu Location=”Add a submenu item to Settings menu”, then it appears as expected in the Settings menu.
    Any attempts with Menu Location=”Add a submenu item to another menu” to place this item back to the menu item “Personen” menu failed. What do I have to enter in Custom Menu Location? The attempts with “Personen”, “Person”, “person” or “posts-person” were not successful so far.

    Regards, Friedbert

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @widigmx

    In order to show a taxonomy under a custom post type you need to associate that taxonomy with that post type (not a custom field!).
    Also, in order for a tagcloud of any kind to work you need to use the default association of taxonomies as well, not a custom field!

    If you remove the custom field and use the default taxonomy association through the Pod settings I think you solved your issue.

    Cheers, Jory

    Thread Starter WidiGMX

    (@widigmx)

    Hi @keraweb,

    Yes, I know that′s the standard way, and yes that′s simple and working
    But then the terms of the taxonomy are listed in the order given by the taxonomy.
    I, on the other hand, don’t want to think of the terms as an unordered set. Rather, I want to prioritize or order the list of taxonomy terms individually for each entry of the custom post type.

    • This reply was modified 4 years, 1 month ago by WidiGMX.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @widigmx

    Then you cannot use the regular WordPress UI for this.
    You could use our relationship field (since that supports ordering) but as you’ve noticed, the UI is different.

    However, by doing this, the objects aren’t related to the taxonomy anymore.
    You could also add the objects to the taxonomy through a filter that will sync the relationships:
    https://docs.pods.io/code-snippets/update-taxonomy-value-stored-relationship-field/

    By doing this you:
    1 – Relate the taxonomies through a relationship so you can order them
    2 – Also relate the taxonomies through the default WP taxonomy rel table so you can use the archive pages.

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Closing topic due to no reply, feel free to open again if you still need help!

    Cheers, Jory

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Howto add tagcloud widgets to relationship fields’ is closed to new replies.