WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Custom Field Template] only get img url when using WYSIWYG (1 post)

  1. lanlan
    Member
    Posted 5 years ago #

    Hello, just got my copy of the Custom Field Template plug-in and it's so nice! I was wondering if it's possible for me to modify some code so that when you choose an image from the WYSIWYG interface, only the img url gets pasted into the field, and not the full HTML for displaying that image.

    The reason for this is because I've been using echo to display my thumbnail from the custom field, that way, I have the flexibility to change the image size:

    <?php if(get_post_meta($post->ID, "thumbnail", true)) { ?>
    	<img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="" width="<?php echo $width; ?>" height="<?php
    	echo $height; ?>" />
    	<?php } ?>

    I really appreciate any help anybody offers. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic