Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
BlueShackMedia

Pull Page Thumbnail (Blog) to Code Block

Question

Hi,

I'm working on a template that doesn't display thumbnails as banners on blogs (Five). I'd rather not swap, so I'm looking for code that I can implement to pull the current page's thumbnail image to a code block. 

Alternatively, pulling the date/author meta to a code block would also work to solve this formatting issue. 

Any leads?

Cheers,
Devon

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

Hi Devon.

You could instead replace the header image on blog items with the post's thumbnail, if that's the effect you'd prefer. The other alternatives you mentioned are also possible.

Thumbnail and meta info is available via each page's JSON data, which can be accessed via JavaScript, added to the page as desired, and styled with just CSS. Such meta may also be available in attributes within the DOM as well.

When dealing with thumbnail images, you could either set them via JS using the "background-image" CSS property or by using an <img> element loaded with ImageLoader. I'd probably go with the former for simplicity (though it may load a larger image, the difference is probably negligible). I'd estimate an experienced dev could do any of those for you in less than a couple hours.

Edited by brandon

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...