-
-
Hello guys. I’ve gave up loooking how to set up post link in my Latest blog widget. I guess I have to modify file latest_blog.php in diretory vc_templates, but i don’t know how.
My website is http://www.hudalukna.si and the widget which i want to modify is right under codeless slider.
Can you please help me with that please?
-
Hello,
Can you please be more clear? What do you need to change to it?
Best regards!
-
Hello.
First please visit http://www.hudalukna.si.
Under the slider I have section with Latest blog post. The latest blog post includes image (thumbnail), heading & description.
So I want to put link to full post on these thumbnails.
-
Hello,
Please go to file vc_templates/latest_blog.php and find this line:
$output .= '<img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2', 'url')).'" alt="">';
Replace it with this:
$output .= '<a href="'.esc_attr(get_permalink()).'"><img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2', 'url')).'" alt=""></a>';
Save file and refresh.Best regards!
-
It’s working! That was very helpful. Thank you very much.
-
I suggest you put this option into visual composer settings of Latest blog settings, i guess that would be very handy for some users.
-
Hello,
Thank you for the suggestion. I will refer it to the developer team.
Best regards!
-
And how’s the same done to the recent news component?
-
Hello,
@wpnoob,
Please go to file vc_templates\recent_news.php and find this line:
$output .= '<dt><img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')).'" alt=""></dt>';
Replace with this:
$output .= '<dt><a href="'.esc_url(get_permalink()).'"><img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')).'" alt=""></a></dt>';
Best regards!
-
-
You must be logged in to reply to this topic.