wordpress模板制作的过程中有时会用到获取父页面的ID,下面是wordpress获取父页面的2种方法。 方法一 global $post; $id = $post -> ID; $parent = get_post_ancestors($post -> ID); print_r($parent); 方法二 global $post; $parent_id = $post -> post_parent; echo $parent_id;
wordpress模板制作的过程中有时会用到获取父页面的ID,下面是wordpress获取父页面的2种方法。 方法一 global $post; $id = $post -> ID; $parent = get_post_ancestors($post -> ID); print_r($parent); 方法二 global $post; $parent_id = $post -> post_parent; echo $parent_id;
Build an efficient and multi-language independent foreign trade website for enterprises
为企业提供全方位的外贸网站建设解决方案,助力中国企业走向世界