abouasy
Forum Replies Created
-
i used code from wp-mix .. i past below in function.php but it display now only one image in the post >>
what if i would like visitor to upload 3 images
// featured images add_theme_support('post-thumbnails'); set_post_thumbnail_size(130, 100, true); // width, height, hard crop // @ http://wp-mix.com/set-attachment-featured-image/ add_filter('the_content', 'set_featured_image_from_attachment'); function set_featured_image_from_attachment($content) { global $post; if (has_post_thumbnail()) { // display the featured image $content = the_post_thumbnail() . $content; } else { // get & set the featured image $attachments = get_children(array( 'post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order' )); if ($attachments) { foreach ($attachments as $attachment) { set_post_thumbnail($post->ID, $attachment->ID); break; } // display the featured image $content = the_post_thumbnail() . $content; } } return $content; }i sent you message with below , i hope it is simple request >>
can you display the uploaded images inside the post ,,
for example
<img class=”attachment-medium” alt=”logo” src=”http://localhost/wp-content/uploads/2013/05/logo.png” width=”130″ height=”137″ />
so in case the post include many image the admin can chose which one should be the feature image
this plugin add the image inside the post and NOT set it as feature image
http://wordpress.org/extend/plugins/post-from-site/
thanks @jeff in advance 🙂
htmlspecialchars is preferred
this link will fix the issue
http://stackoverflow.com/questions/46483/htmlentities-vs-htmlspecialchars
.. @jeff plz update it
thanks for the amazing plugin 🙂