Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jofftan

    (@jofftan)

    Is it working for someone?

    Thread Starter jofftan

    (@jofftan)

    Wow Thank you!
    I never thought I could learn some thing that was so amazing today.

    Thread Starter jofftan

    (@jofftan)

    I’m amazed to see that there is so much genius in theses forums that are ready to infantilized you with their superiority behavior.

    So you really think that is faster to create an account wrote a post with technological questions about something your not sure than to query Google!

    For those who really want to help with their knowledge and are in this forum to contribute I really need some help.

    I looked at others threads, I got through the custom and meta functions references and I don’t know how to do it.

    I want to display the file name as a link in other way, the links.

    I use the Custom Field Template plugin with only one type of field configured like that:
    [Document 1]
    type = file

    [Document 2]
    type = file

    [Document 3]
    type = file

    <?php
    	$document_1 = get_post_meta($post->ID, 'Document 1', true);
    	$document_2 = get_post_meta($post_id, 'Document 2', true);
    ?>
    
    	<li><?= wp_get_attachment_link("document_1") ?></li>
    	<li><?= $document_2 ?></li>				 
    
    	<p>Meta information for this post:</p>
    		<?php the_meta(); ?>

    The Meta return me Document 1 with the id 139
    The

    • display file not found
      And the files is there I’ve check in the upload folder
    • So if someone can help me it would be a nice share of time.

      Thank you

    ok seriously:
    <?= wp_get_attachment_link("document_1") ?> should be <?= wp_get_attachment_link($document_1) ?>
    You need to pass a variable not a string.

    Thread Starter jofftan

    (@jofftan)

    Thank you proximity that a nice share of time!

    It’s working well, too many messing around that I lost focus!
    I will now go enjoy sunshine with my daughter now that you made my day!

    Thank you

    You’re welcome.
    Please mark the topic closed too thanks.
    Enjoy your day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Custom Field Template] Upload files displaying some kind of id’ is closed to new replies.