admin管理员组

文章数量:1134578

Problem: I have a overview-page with a sub-page. Both pages are still in status "draft". Now I want to create a link on the overview-page to the sub-page, a popup appears, but in the list of internal pages, the drafted pages do not appear.

  1. Do I need to publish the sub-pages first to be able to link to them, or is there another way?
  2. Why are they not appearing in the list of internal pages?

Problem: I have a overview-page with a sub-page. Both pages are still in status "draft". Now I want to create a link on the overview-page to the sub-page, a popup appears, but in the list of internal pages, the drafted pages do not appear.

  1. Do I need to publish the sub-pages first to be able to link to them, or is there another way?
  2. Why are they not appearing in the list of internal pages?
Share Improve this question asked Jun 17, 2011 at 13:54 AndreasAndreas 611 silver badge2 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 5

I should start off by saying that linking to drafts will only work for logged in users (with appropriate permissions) - other users will simply hit a 404 Not Found!

You'd be much better off getting all your content ready & published, or only link to it once it is ready!

Nevertheless, to answer your question, to link to a draft simply enter the URL manually in the URL field (as opposed to searching for the page using the link feature).

It'll probably be something like http://example.com/?page_id=X&preview=true - you can find it beneath the title field when editing.

Why are [drafts] not appearing in the list of internal pages?

The very nature of the WordPress 'link to content' feature is to ease the process mentioned above. It only shows published content, as this almost always what you want to link to (rather than cluttering up the results with drafts, revisions etc.).

I realise this is an old question (12+ years), but I don't think it was adequately answered. The best solution for the situation the OP asked about is to simply link to the post ID for each draft article.

As soon as you save a draft, it is assigned an ID. You'll see this ID number in all URLs related to that post, such as when editing the post. When editing the post, it will have a URI like this: https://example.net/wp-admin/post.php?post=13985

Let's say the draft post ID is 13985, you can link to that ID using the following URI: https://example.net/?p=13985.

These links will continue to work even after the draft is published.

Obviously, it's important to ensure you publish all the drafts you've linked to.

本文标签: Is it possible to link to draft pages