Newly created page appears in menu
-
If I create a page it is automatically added to my menu.
global $user_ID; $page['post_type'] = 'page'; $page['post_content'] = $content; $page['post_parent'] = 0; $page['post_author'] = $user_ID; $page['post_status'] = 'publish'; $page['post_title'] = $title; $pageid = wp_insert_post ($page);
If I change ‘post_status’ to ‘private’, then it doesn’t appear in the menu, but can’t be read either. It also has the word “PRIVATE” added to the title.
I see there is an option to define custom status, but I’m unsure how to use it or whether it will help.
I want to create a page that isn’t added to the menu, on which I can place my shortcode to call a function to render a page.
Calling the page from the menu isn’t going to work because it needs additional parameters.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Newly created page appears in menu’ is closed to new replies.