I know I’m bad with coding, but I tried whatever I could find on the internet, and I ended up with this, which is not giving an error, but also when using the shortcode [my_playlist] in a post, only a part is showing "Listen to the full score songs playlist frompostname"
Can you please tell me what am I doing wrong, how should I make the rest of the html after the_title(); display? thank you so much
// function that runs when shortcode is called
function wpb_playlist_shortcode() {
// Things that you want to do.
$string .= '<center>' . _e(' Listen to the full score songs playlist from', 'wpml_theme') . '<strong>' . the_title(); ' </strong>
<br/>
<span class="playlist"><img class="middle" src="https://example.com/images/play-this-song.png" /> YouTube</span> <br/> <span class="playlist2"><img class="middle" src="https://exampl.com/images/play-this-song.png" /> Deezer</span> <br/><span class="playlist3"><img class="middle" src="https://exampl.com/images/play-this-song.png" /> Spotify</span></center>';
// Output needs to be return
return $string;
}
// Register shortcode
add_shortcode('my_playlist', 'wpb_playlist_shortcode');