The site is on the WordPress engine, the ninja popups plugin is installed. The page code contains the following:

<div style= "position:fixed; right:0px; bottom:55%;"> <?php echo do_shortcode('[ninja-popup ID=700] тут должна быть картинка [/ninja-popup]'); ?> </div> 

How to insert a picture between the shortcode tags? Visited so:

 <?php $a = "<img src='http://xn--d1alcggabcc5a.xn--p1ai/wp-content/uploads/2016/09/199.png'>"; ?> <div style= "position:fixed; right:0px; bottom:55%;"> <?php echo do_shortcode('[ninja-popup ID=700] echo $a [/ninja-popup]'); ?> </div> 

But without results, even the usual code to insert an image does not work in shortcode tags.

  • You can close, solved the problem. - Sergey Makhmudov
  • one
    If possible, publish the solution found in response to your question . I am sure it will help many of your colleagues in the future. - Nicolas Chabanovsky

1 answer 1

 <?php $a = "<img src='http://xn--d1alcggabcc5a.xn--p1ai/wp-content/uploads/2016/09/199.png'>"; ?> <div style= "position:fixed; right:0px; bottom:55%;"> <?=do_shortcode('[ninja-popup ID=700]'.$a.'[/ninja-popup]')?> </div> 

for pasting a variable with a string, take it out of the quotation marks by connecting the string and the variable point