Home › Forums › General Issues › Modify a file field in post
Hello, I wanted to report a strange thing, after creating a file field to insert a document for downloading, if I want to modify it, going to click on the pen, (see image),
it doesn’t let me do it, I still have the document I have previously entered,
what should i do?
I wanted to ask how can I delete the pen icon by modifying the php code
Thank you.
Not sure you’ve given enough information. I what are you trying to accomplish?
hey you can infomation briefly please , can can think about say you i thin you are say how ti add pdf file in wordpress post
Readards=
my idea is to create a document tree, with posts, inserting a file field, for download, but I can’t replace the documents already inserted. I can only delete them and insert the new file, without changing an entry already made (using the pencil icon). I hope I explained myself.
That is they only way with only ACF to change the file, remove and insert a new one. If you want to replace and existing file try this https://wordpress.org/plugins/enable-media-replace/
ok, but what is the purpose of the pen button?
is there a way to delete the button by acting on the php?
The pen button opens the standard WP edit screen for the file. This works the same as if you went to the media folder and opened the WP editor for it from there. You can’t delete the button, but you can probably hide it with some custom CSS added to the admin of your site.
Ok thank-you,can you kindly tell me, the name of the div, which I have to hide? Thanks.
I solved the problem by myself.
In the file class-acf-field-file.php
remove:
<a class="acf-icon -pencil dark" data-name="edit" href="#" title="<?php _e('Edit', 'acf'); ?>"></a>
Thanks anyway.
The topic ‘Modify a file field in post’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.