Trying to put PHP in a page

I uploaded a couple images to my themes images directory.
I went to the page tried to insert

<?php echo get_stylesheet_directory_uri(); ?>

but the source I get back is

<img id="urt-videos" src="../wp-content/themes/urturt/images/media-first-layer.jpg" alt="" /><br />
<img id="urt-ventures" src="<?php echo get_stylesheet_directory_uri(); ?>/images/media-second-layer.jpg&#8221; alt=&#8221;&#8221; />

the first image works, but not the 2nd

so you are not using the the “add media” button?
D

I didn’t think I could cause I uploaded the images using FTP and not through wordpress, if I do it through wordpress,. is it better?

If you upload the images to the correct directory, you can use the plugin “Add From Server” to get the media library to recognize them and then you can use the “Add media” button. But they have to be uploaded to the uploads directory.

thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.