if else

记一段代码,其实就是WordPress获取自定义域的值的,更多相关函数参考《WordPress常用函数大全

1
2
3
4
5
6
7
8
9
10
<? if(get_post_meta($post->ID, "_name1", true)) { ?>

   
<? } else if (get_post_meta($post->ID, "_name2", true)) {?>


<? } else { ?>


<? } ?>

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL