我知道我不擅长编码,但我尝试了在互联网上找到的任何东西,最终我得到了这个结果,这并没有给出一个错误,而且当在帖子中使用快捷码[我的播放列表]时,只有一部分显示“my\\u playlist”;聆听来自PostName的满分歌曲播放列表;
你能告诉我我做错了什么吗?我应该如何在\\u title()之后生成其余的html;陈列非常感谢你
// 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\');