Support » Plugin: Block Lab » Images appear as URL

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @designbyjm,
    Thanks for bringing this up, hope you’re having a good day.

    That’s the expected behavior for block_field(), it echoes the image URL.

    To echo an actual <img> with the right image, how about something like this, from the documentation?

    
    <?php
    $attachment_id = block_value( 'pets-photo' );
    echo wp_get_attachment_image( $attachment_id, 'thumbnail' );
    ?>
    
    • This reply was modified 2 months, 3 weeks ago by Ryan Kienstra.

    Ahhhh, interesting.
    I guess I would assume that adding the block would add the front-end display as well.

    I wish you guys had more documentation around adding custom post types to this. I am working on a project where I really don’t want to use the Views solution from Toolset but I want to be able to add a Block super fast from a Post.

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @designbyjm,
    Ah, thanks for mentioning that, it helps to have your feedback.

    I wish you guys had more documentation around adding custom post types to this.

    Hm, there’s documentation here:
    https://cldup.com/QdeHU0AoSx.png

    …but it sounds like Block Lab came across as a different solution than it is.

    Hi @ryankienstra,
    For someone that doesn’t really write code in WordPress but does use Custom Post Types; it’s always nice to have options to not have to write code and have integrations in Blocks editor.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.