Any chance to inserting custom html like 3 or 4 fancy images instead of one blog preview image?
custom html instead of blog preview image
(4 posts)
(2 voices)
-
Posted 1 year ago #
-
Hi,
Inserting HTML code there would be a really complex task. Also, you would need to edit a lot of CSS code in order to make it look good.
Here I will tell you how to include your own image there, instead of the post thumbnail. Maybe this works for you.
Go to the theme folder, and open the file "lib/functions/posts.php". In line #36 and #73, you will find this code:
$meta_image = get_post_meta($post->ID, "post_image", true);Replace both of them with:
$meta_image = get_post_meta($post->ID, 'custom_image', true);Now, when you create your posts, you will have to add a custom field to them, called "custom_image" and containing the full URL to your new image.
Posted 1 year ago # -
Thank you Ruderic for your quick request. But that is not the solution I was looking for.
My idea was to create an custom field instead of blog preview image for inserting pure html. For creating a slider instead of blog preview or a few thumbs.
But thank for your help.
Posted 1 year ago # -
Hi,
If you open that file "lib/functions/posts.php", in lines #53 and #90 you will find this code:
<img class="framed fade_hover" src="<?php echo $meta_image; ?>" width="126" height="90" alt="<?php echo $post_title; ?>"/><br />Replace that code with:
<?php echo get_post_meta($post->ID, 'custom_html', true); ?>Now, create a custom field called "custom_html" in your posts, and insert your HTML code there.
As I said, you will probably need a lot of CSS tweaks in order to make it look right. If you need help, feel free to ask us any question.
Posted 1 year ago #
Reply
You must log in to post.













