2017-02-02 3 views

답변

0

perticualr 후크 중에 페이지를 추가하려는 경우 아래 코드를 사용할 수 있습니다.

$page_id = wp_insert_post( 
         array( 
          'post_title'  => 'Page Title', 
          'post_name'  => 'Page Title', 
          'post_content' => 'Page Content', 
          'post_status' => 'publish', 
          'post_author' => 1, // or "1" (super-admin?) 
          'post_type'  => 'page', 
          'menu_order'  => 1, 
          'comment_status' => 'closed', 
          'ping_status' => 'closed', 
         ) 
        ); 
관련 문제