I have a custom made widget, and to a front-end display, I want to display the image that the administrator can add url in custom field. Now I get it displayed outside .widget
class and so I can't align it properly with flexbox as I did my other two text elements which sit perfectly inside .widget
container. If I try to concatenate <img>
before $args['after_title'];
I get syntax error Parse error: syntax error, unexpected '.'
.
This is the code:
<?php echo $args['before_widget'] . $args['before_title']; ?> <img src="<?php echo $image; ?>"></img> <?php . $args['after_title']; ?>
<?php echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title']; ?>
<?php echo $args['before_widget'] . $args['before_title'] . $description . $args['after_title']; ?>