Support » Plugin: Block Lab » Can I echo a url path and add an image name in the text field

  • Resolved bluestcube

    (@bluestcube)


    I want to link to an svg image in a certain folder because the media library won’t accept SVG images and using an svg cleaner plugin is not an option. I’m trying to create a path variable and then using the block lab text field to put in the name of the image as a string. My php is not that great.

    but the output html looks like this:

    ‘logo.svgwp-content/themes/mytheme/images/logos/logo.svg’

    Is there a way to achieve this?

    Thanks

    • This topic was modified 1 year ago by bluestcube.
    • This topic was modified 1 year ago by bluestcube.
    • This topic was modified 1 year ago by bluestcube.
    • This topic was modified 1 year ago by bluestcube.
    • This topic was modified 1 year ago by bluestcube.
Viewing 1 replies (of 1 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @bluestcube,
    Thanks a lot for using this plugin!

    Sure, you could create a text field, and add the path in it:

    https://cldup.com/fYoX0SHtVJ.png

    Then, you could output it in the template with either:

    
    block_field( 'example-text-field-name' );
    

    …or:

    
    echo block_value( 'example-text-field-name' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Can I echo a url path and add an image name in the text field’ is closed to new replies.