Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Change masonry blog post structure
New Landing › How can we help? › Atelier › Change masonry blog post structure
- This topic has 12 replies, 3 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
November 10, 2015 at 4:33 pm #227516
I need to change the structure of the post containers that are in masonry. Where are the post layouts being generated?
Attached is an image of the current layout & an image of what it needs to look like.
Attachments:
You must be logged in to view attached files.November 10, 2015 at 10:54 pm #227616Any thoughts here? Which file generates the layout for the masonry blog format?
November 11, 2015 at 11:21 am #227696Hi,
You can edit sf-post-formats.php file at /atelier/swift-framework/content/.
Thanks
MohammadNovember 12, 2015 at 11:33 pm #228435Thanks Mohammad, I found the section that I need to add to but what I’m adding doesn’t seem to be return the actual post thumbnail. Is there a function built into Atelier that I can call here?
Here is the snippet i’ve added:
style="background:url('.get_post_thumbnail_id( $post_id ).');"
Here the complete variable:
$blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" style="background:url('.get_post_thumbnail_id( $post_id ).');" class="blog-item ' . $item_class . ' ' . $term_slug . ' ' . implode( ' ', get_post_class() ) . '" id="' . get_the_ID() . '" data-date="' . get_the_time( 'U' ) . '">';
What I need to do in the end is set the post thumbnail as the background image for the blog_item.
November 13, 2015 at 7:53 am #228470Hi,
Please change your code:-
style="background:url('.get_post_thumbnail_id( $post_id ).');"
With this code:-
style="background:url('.wp_get_attachment_url(get_post_thumbnail_id( $postID )).');"
Thanks
MohammadNovember 13, 2015 at 5:02 pm #228657Thanks for the response Mohammad. I replaced my code with what you supplied and the output didn’t change. Here is what rendered:
<li itemscope="" itemtype="http://schema.org/BlogPosting" style="opacity: 1; position: absolute; left: 0px; top: 15px; background: url(http://hjalmarcarlson.com/lab/hailnails/);" class="blog-item col-sm-4 uncategorized post-190 post type-post status-publish format-standard hentry category-uncategorized item-animated" id="190" data-date="1445876386">
I was expecting the complete thumbnail URL here:
background: url(http://hjalmarcarlson.com/lab/hailnails/);
What other things should I try here?
November 13, 2015 at 6:42 pm #228683Hi,
Just provide me login detail after installing WPIDE plugin.
Thanks
MohammadNovember 13, 2015 at 7:40 pm #228711This reply has been marked as private.November 13, 2015 at 7:45 pm #228715Hi,
I just forwarded to my colleague so he continue to assist you.
-Rui
November 16, 2015 at 7:56 pm #229179This reply has been marked as private.November 17, 2015 at 7:58 am #229231Hi,
I just resolved the issue so please check it now.
Thanks
MohammadNovember 17, 2015 at 3:26 pm #229383Awesome! Thanks for the help Mohammad!
November 17, 2015 at 4:45 pm #229415Hi,
You most welcome. Glad to help you.
Thanks
Mohammad -
Posted in: Atelier
You must be logged in to reply to this topic.