• Resolved leandro_S

    (@leandro_s)


    If I use one of your code snippets as an image title, wordpress writes it literally (If I pput it into “”) or simply doesn’t render it if I remove the commas and try to add them scaped inside the snippet output.
    This way, it takes the snippet as a string:
    <img src="http://www.mydomain.com/wp-content/uploads/2016/01/man_working.png" title="[php snippet=13 param="var_name=dib_hombre"]" class = "home_imgs"/>
    This way, it takes part of the snippet as a string:
    <img src="http://www.mydomain.com/wp-content/uploads/2016/01/man_working.png" title=[php snippet=13 param="var_name=dib_hombre"] class = "home_imgs"/>
    I guess it has something to do with the way WordPress preprocesses the IMG tag.

    https://wordpress.org/plugins/php-code-for-posts/

Viewing 1 replies (of 1 total)
  • Plugin Author Jamie Fraser

    (@thejfraser)

    Hi Leandro,

    It is mentioned in an earlier thread as well, it would appear the WordPress process for handling shortcodes ignores those in attributes now, so the work around is to have your snippet output the full attribute e.g. title=”foobar” rather than just the text for the attribute.

    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Snippet as image title is not rendered’ is closed to new replies.