Get url of file – step by step
-
hello, i have a problem with implementing my own function into wordpress. I have this plugin and I need to display / add link to the file uploaded by the form. I used the code sent 2 threads before but I don’t know exactly where to add this code:
// The action callback function. function example_callback_id_generated( $attachment_id ) { // (maybe) do something with the args. $url = wp_get_attachment_url( $attachment_id ); } add_action( 'nmr_create_attachment_id_generated', 'example_callback_id_generated', 10, 1 );
Adding it to the functions.php file in the themes directory I get a fatal wordpress error.
I then added it to the file: store-file-uploads-for-contact-form-7.php, But when calling it as “[nmr_create_attachment_id_generated]” I get plain text – no location ….
I want the file location to show up in the textbox.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get url of file – step by step’ is closed to new replies.