I want to create a custom post in wordpress which will be displayed like this following image (click the link)
Output of the custom post
What will be the good practice for this? I sorted out a way but that will require 3 different custom posts for this single section. I want to create one custom post and my featured image size will be the output as shown in the picture.
I have created the custom post type, just can't sort out what do I need for the php file and css and/or any extra library. I am using bootstrap and have JQuery.
$i=0;
foreach($yourArray as $array){
if($i==4 || $i==5){
// change your image html as per your requirement for two big image
}
// your html of other 8 same size images
$i++;
}
As you need different thumbnail size for each post, You can upload same size image for all post and crop the image unsing BFI Thumb library based on condition.
Library for cropping images for specific dimension is available at below link.
https://github.com/bfintal/bfi_thumb
Related
I have created 2 blogposts in wordpress and shared them in twitter.
The twitter URLs are
https://twitter.com/Jagannathan6/status/1423662392534175744?s=20
and the other is
https://twitter.com/Jagannathan6/status/1423197036195717124?s=20
As you see the image appears as a thumbnail in one tweet and as a large image in another. How to make the thumbnail image appear as a large image? Has it got something with the size of the image?
I am looking for an answer where I need not get premium version of wordpress.
Easiest way is to use Yoast plugin. Taking a look at the two tweets I'm wondering:
Are you using media sizes to size the images (Wordpress takes the largest image it can and resizes and/or crops smaller images to fit the sizes in the Media options menu)?
Are you using Yoast or custom hooks to post the images to twitter?
Are you using the same size images for both posts?
Are you attaching the images as Featured Images in the editor in the same way?
Did you post them to twitter in the same way?
Do both posts have snippets / excerpts applied to them? If not, make sure your theme is calling the_excerpt, or else you've configured the excerpt to pull from the main body of the post, or else hand-craft the excerpt in the relevant meta box.
Do both images have meta tags / alt tags applied to them? Check in the Media Library or in the post > edit image and see that alt text, caption and description are all filled out.
Did you test the images first with https://cards-dev.twitter.com/validator ?
How to add a separate banner image for every different post on Wordpress?
the plugin used so far : but no improvement .Did any one tell me what to do now?
Unique Headers Plugin
WP Display Header.
WP Header Images
Here is the link: https://surabigroups.com/
for example:
1. I want to add a separate banner for this post [https://surabigroups.com/hr-activites/][2]
2. I want to add a different banner for this post [https://surabigroups.com/hr-conference-meet/][2] like this I want to add a different different banner for a different post
Plugin user so far :
1. Unique Headers Plugin
2. WP Display Header.
3. WP Header Images
I do not know actually what do you mean, but every post has a featured image in wordpress which you can use as a background image (just you need to add inline css) or you can use a custom field (by downloading the custom field plugin) to add image for background image for every post.
I'm using the Divi theme to build a website in WordPress. The problem I'm facing is this:
wrong image
I'm using the gallery module to display a set of pictures in grid mode. But all the images loaded are shown as above. Id like to display the original image instead of the medium one.
original image
WordPress creates some versions of my images but the aspect ratio is different, so this crop effect is applied on my gallery items.
I have tried to set the correct size on medium images from media settings and generated the images again but nothing changed.
Divi theme uses its own functions to generate thumbnails that hard crop original images by default.
Try editing post_thubnails_divi.php file on theme folder using the dimensions that suit you and set the crop value to false.
$crop = apply_filters( 'et_post_thumbnails_crop', false );
hi you can download the Gallery layout and install it in your DIVI theme. it give some layout options for gallery design.
https://www.elegantthemes.com/blog/divi-resources/free-divi-photo-gallery-layout-pack-5-stunning-gallery-page-layouts-in-one-convenient-download
Note : subscribe it and they will send the downloadable link to your email
thanks
I am using add_image_size() function to add custom image sizes in wordpress and want to show downloadable link of any image size in single post. If you don't understand what I want to say please take a look at the following website.
http://www.alliphonewallpapers.com/iphone-wallpaper/id/3238/
It save images in different sizes and add link of that size in its post. I also want to add links of different image size. Please help me.
Well, you need to obtain thumbnail URL. Look at Wordpress Codex, there is an example that perfectly fits your needs and it even shows given URL only if given thumbnail size is available:
http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail#Post_Thumbnail_Linking_to_large_Image_Size
I want to do an image gallery in a page, where the linked image (a href) is different from the thumbnail's src. I need to have the ability to change the thumbnail image. Its important because for each image i have a different thumbnail (different content and size).
What can I do?
You can use this plugin which have different options to set the image URL and image size
Plugin : WP Gallery Custom Link
May be it helps you to solve this issue.
You can use this plugin to asign different image sizes to different links.
Plugin: gallery with custom links