根据wordpress文章ID判断是否有相册并调用,不废话直接上代码,在需要显示的位置调用下面代码即可。 $post_id = 88; $has_gallery = ( count( get_post_galleries( $post_id, false ) ) > 0 ); if ( $has_gallery ) { echo "This post has a gallery."; } else { echo "This post does not have a gallery."; …
根据wordpress文章ID判断是否有相册并调用,不废话直接上代码,在需要显示的位置调用下面代码即可。 $post_id = 88; $has_gallery = ( count( get_post_galleries( $post_id, false ) ) > 0 ); if ( $has_gallery ) { echo "This post has a gallery."; } else { echo "This post does not have a gallery."; …
Build an efficient and multi-language independent foreign trade website for enterprises
为企业提供全方位的外贸网站建设解决方案,助力中国企业走向世界