A
A
Andy-shak2015-11-05 13:15:54
WordPress
Andy-shak, 2015-11-05 13:15:54

What is the error when displaying images from custom fields?

I'm trying to display a picture from my own arbitrary. For output I use this code:

<img src="<?php bloginfo('home') ?>/wp-content/uploads/myfolder/<?php echo get_post_meta($post->ID, "image-1", true); ?>.jpg" />

After publication, the picture is not displayed and when viewing the source code through the browser, the path is correct, but a different name for the picture is given. How to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question