Permalink for DRAFT/FUTURE posts
-
Hi again,
with draft/future posts, wp creates different urls (correct urls are only for published posts).
-
Hi @hazmicz,
Thank you very much for next reporting issue. I am very happy that you are so involved.
I added support for future post type. Unfortunately, for the draft post type I can’t create a unique slug, so this is not supported. Please download latest update and check it.
Is there anything else I can do for you?
If you are satisfied with using the plugin, maybe you would add her rating here: https://ww.wp.xz.cn/support/plugin/wp-better-permalinks/reviews/? I will be grateful for 5 stars! It is very important for me 😉
-
This reply was modified 8 years, 2 months ago by
Mateusz Gbiorczyk.
Hi,
thank you for your support (future posts works ok now). I needed draft unique link for other purpose (so for this i created my own solution).
Hi @hazmicz,
I am happy to. If you are satisfied with using the plugin, maybe you would add her rating here: https://ww.wp.xz.cn/support/plugin/wp-better-permalinks/reviews/? I will be grateful for 5 stars! It is very important for me 😉
-
This reply was modified 8 years, 2 months ago by
Mateusz Gbiorczyk.
-
This reply was modified 8 years, 2 months ago by
Mateusz Gbiorczyk.
Hi, I already give you the rating 🙂
Thanks you 🙂
Hi,
why it’s not possible to create unique slug for the draft posts?
This is not possible. WordPress does not generate slug for drafts.
Hmm.. WordPress generally does not generate slug for other example of types (custom-pos-type->term->slug ..), but your plugin solved this.
So this is generally not possible, no way to do this?
Yes, but then I use slug, and I do not have drafted him.
An idea – i get the slug of draft posts with help this:
1/ i hooked “save_post” action and check, if a post is a draft
2/ if so, than i remove this action and update post with status “publish” and immediately to draft – with this i get “post_name” slug from DB
3/ put back “save_post” actionIt is possible to make this to your plugin?
No, I can not do it globally in plugin. Try to write your function for this, so that you can save public post and then my plugin will be launched.
Hi Mateus,
one more time – what do you mean “WordPress does not generate slug for drafts”? Can you link me to WordPress codex, where i can see this default behaviour described?
-
This reply was modified 7 years, 9 months ago by
hazmicz.
There is no slug fordraft. You can not take $post->post_name value.
Hmm.. i’m trying create draft post and my permalink looks ok (slug from title, DB column post_name shows the slug too).. so?
(on my project site, if a create draft, the only problem is, that i cannot see taxonomy term slug in permalink)
-
This reply was modified 7 years, 9 months ago by
hazmicz.
You have access to plugin code. You can prepare change that will handle it. If it works, I will add it to the core.
When I tried to do it, I encountered a problem. I thought that there was no need to create custom links for draft, so I did not try to do it at all costs.
-
This reply was modified 8 years, 2 months ago by
The topic ‘Permalink for DRAFT/FUTURE posts’ is closed to new replies.