New Landing How can we help? Atelier Change masonry blog post structure

Viewing 13 posts - 1 through 13 (of 13 total)
  • Posted in: Atelier
  • #227516
    HjalmarCarlson
    Member
    Post count: 30

    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.
    #227616
    HjalmarCarlson
    Member
    Post count: 30

    Any thoughts here? Which file generates the layout for the masonry blog format?

    #227696
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can edit sf-post-formats.php file at /atelier/swift-framework/content/.
    Thanks
    Mohammad

    #228435
    HjalmarCarlson
    Member
    Post count: 30

    Thanks 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.

    #228470
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #228657
    HjalmarCarlson
    Member
    Post count: 30

    Thanks 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?

    #228683
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Just provide me login detail after installing WPIDE plugin.
    Thanks
    Mohammad

    #228711
    HjalmarCarlson
    Member
    Post count: 30
    This reply has been marked as private.
    #228715
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    I just forwarded to my colleague so he continue to assist you.

    -Rui

    #229179
    HjalmarCarlson
    Member
    Post count: 30
    This reply has been marked as private.
    #229231
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I just resolved the issue so please check it now.
    Thanks
    Mohammad

    #229383
    HjalmarCarlson
    Member
    Post count: 30

    Awesome! Thanks for the help Mohammad!

    #229415
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. Glad to help you.
    Thanks
    Mohammad

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.