Many times people create bigger post or article. Many wp developers asks me many questions daily. Most commonly I asked about showing the all the post images as slide show or only thumbs. Using following code you can fetch the wordpress thumbnails. You just need to put following code into your functions.php file.
How to display attached images of posts
Using following code you can display attached images of posts. You just need to put following code into your functions.php file and you will be done.
functions.php file you can find in your wordpress theme folder. Put following function in that file.
Many people use the scaled image for thumbnail image. Instead of that croping image the proper size and showing that is nice. Crop Uploaded image without plugin is supported by wordpress itself so do not use any third-party plugin for this.
crop uploaded image in wordpress
You can use the following code in your functions.php file:
Featured images are very important feature of wordpress. Many blogger use the featured images on top. With watching the featured images user got idea about blog post or your article. Some time we miss to upload the featured image.
How to show featured image in wordpress admin panel list
But in post list cannot able to see the featured image in admin panel.
I found very nice wordpress plugin which is helpful to show the featured image in admin panel.
Featured Image Column – Adds a column to the edit screen with the featured image if it exists.
This plugin has no options. It simply adds a column before the title (far left) the show’s the posts featured image if it’s supported and/or exists.
Add a defualt image simply by filtering you own image in. Use featured_image_column_default_image or filter your own CSS by using featured_image_column_css.
Add support for a custom default image
How to show featured image in admin panel list – in post list – for wordpress
Code for File upload with meta box in wordpress using custom post type using meta boxes in wordpress. From wordpress 3.0 version wordpress introduced the custom_post_type function. Many people want to attach the file field with add_meta_box function. In this tutorial I will tell you how to upload file with custom meta box and post type. I tested above code with new wordpress versions 3.9. Still code is working fine.
Code for File upload with meta box in wordpress using custom post type using meta boxes in wordpress.
In this tutorial I will show you how to create the custom post type and add custom meta boxes to that post type and upload file with custom meta box.
After digging into wordpress files and functions I created following code. Just open your functions.php file and put following code in that file for creating custom post type.
For uploading the file through custom meta box use the following code. Following code will add the file field to custom meta box and you are able to upload file or image to wordpress and upload file attachment to you custom post. Following code is very helpful to many wordpress theme and plugin developer. If you are having any issues or trouble using code then get back to me.
File upload with add_meta_box or custom_post_type in wordpress File upload with meta box in wordpress
For Uploading the file your post form need to add the enctype=”multipart/form-data” type to your form. Just use the following code in your functions.php file.
[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]