Such a situation, when you add a picture to a post, then a picture and a brief description is displayed, if the picture is not added, a stub is displayed instead.
In php I removed the output of the stub and now I want to make sure that when the picture is not added, the description stretches the entire width.
Here is the code:
if ( ! isset( $barcelona_placeholder_img ) || false === $barcelona_placeholder_img ) { $barcelona_placeholder_img = 'assets/images/placeholders/' . ( $size == 'full' ? 'barcelona-full' : $size ) . '-pthumb.jpg'; if ( is_readable( BARCELONA_SERVER_PATH . $barcelona_placeholder_img ) ) { @list( $barcelona_width, $barcelona_height ) = getimagesize( BARCELONA_SERVER_PATH . $barcelona_placeholder_img ); } $barcelona_placeholder_img = BARCELONA_THEME_PATH . $barcelona_placeholder_img; } I know that I need to connect to this js that if there is no picture, he would draw a different style or assign another class, but I don’t know how to do it
Please tell me.