2021
11-19
11-19
wordpress 通过get_the_ID和the_ID函数获取文章ID
get_the_ID() 返回当前文章的ID号,此标签必须在主循环里。
用法:<?php get_the_ID(); ?>
示例:
eg1:
<?php
$id = get_the_ID();
$dropdown = "<select name='dropdown-".$id."' >";
$dropdown.="<option id='o.... Read More >