• Resolved simonbequiet

    (@simonbequiet)


    Hi,

    I just tried your plugin and looks great but I’m using Relationship fields to link “Questions” and “Options” post types and by default it’s only showing the first option and then “and X more” label.
    I checked the different filters displayed on your plugin’s page description and didn’t find something related to that.
    Maybe I misread it, but would you have a solution in order to display all values instead of only the first ?

    Thanks in advance and have a great day,
    Simon

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Florian Eickhorst

    (@flei)

    Hello @simonbequiet ,

    thank you for your message.

    There is no special filter for changing the “X remaining items” output. However I would just recommend using filter ‘acf/admin_columns/render_output’ for manipulating the column output.

    Example: The following code will output the title of all related posts of all relationship fields and link to their respective admin edit page:

    add_filter('acf/admin_columns/render_output', function ($render_output, $field_properties, $original_field_value, $post_id) {

    if ($field_properties['type'] == 'relationship') {
    if (!empty($original_field_value)) {
    $render_output = '';
    foreach ($original_field_value as $relationship_post_id) {
    $render_output .= '<a href="' . get_edit_post_link($relationship_post_id) . '">' . get_the_title($relationship_post_id) . '</a><br>';
    }
    return $render_output;
    }
    }

    return $render_output;
    }, 10, 4);

    IMPORTANT: Please note that there is currently a mistake in the documentation stating the wrong filter name. I have updated the documentation but it has not been published by the registry yet. The correct filter name is ‘acf/admin_columns/render_output’, NOT ‘acf/admin_columns/column/render_output’!

    Let me know if this helps you or if you keep having difficulties.

    Best regards,

    Florian

    Thread Starter simonbequiet

    (@simonbequiet)

    Hello Florian,

    Thanks a lot, it works perfectly !
    That’s exactly what I wanted.

    Have a great day,
    Simon

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show all values instead of “and X more”’ is closed to new replies.