Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to change text input to image in label #8

Open
VladNov opened this issue Mar 22, 2018 · 1 comment
Open

Option to change text input to image in label #8

VladNov opened this issue Mar 22, 2018 · 1 comment

Comments

@VladNov
Copy link

VladNov commented Mar 22, 2018

Great add-on!
Is it be possible to change the text from text input field to image in label? In case if a repeater does not have a text field.

@bfiessinger
Copy link

bfiessinger commented Apr 25, 2019

You could change some lines in /views/repeater-table.php

Starting from Line 11:

<strong>
  <?php
     $rowTitle = $row[$title_input_key];
     if ( is_numeric( $rowTitle ) && get_post( $rowTitle ) ) {
        $rowTitle = get_post( $rowTitle )->post_title;
     }
  ?>
  <a class="edit-field" title="<?php _e( 'Edit', 'acf_child_post_field' ); ?> <?php echo esc_attr( $field['button_label'] ); ?>" href="#"><?php echo $rowTitle; ?></a>        
</strong>

Just a little fix to output the name of a post instead of the ID. You can do the same thing for Attachments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants