好了,你可以添加簡碼到WP模板文件,如: <?php echo do_shortcode('[my_awesome_shortcode]'); ?>
但如果短碼旨在環繞內容是這樣的: [my_awesome_shortcode]
Hey, this is the content within the awesome shortcode.
[/my_awesome_shortcode]
好吧,我已經嘗試了很多短代碼片段在我的文章(不是頁面)顯示3最近的職位作爲短代碼。 像: function posts_shortcode() {
$the_query = new WP_Query(array('posts_per_page' => 3));
// The Loop
while ($the_query->have_posts()) : $the_query->the_po