[wp-trac] [WordPress Trac] #54964: get_permalink
WordPress Trac
noreply at wordpress.org
Thu Jan 27 22:10:49 UTC 2022
#54964: get_permalink
-------------------------------------------------+-------------------------
Reporter: jakubaondrej | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: I18N | Version: 5.9
Severity: blocker | Keywords: needs-patch
Focuses: accessibility, rest-api, coding- |
standards |
-------------------------------------------------+-------------------------
Hello,
get_permalink does not work well for custom posts with slug rewrite.
E.g. I have implemented articles post type:
{{{#!php
<?php
register_post_type('articles',
array(...
'rewrite' => array('slug' => _x('articles','slug','mydomain')),...));
}}}
'articles' is translateD to slovak language as 'clanky'. But
**get_permalink({id_of_article})** returns '''localhost:10010/articles/my-
title'''. It is wrong and i have recieve error 404, because right link is
'''localhost:10010/clanky/my-title'''.
It works OK for older WP version.
Thanks a lot for any result.
Kind regards,
Ondrej Jakuba
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54964>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list