WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #45159, comment 1


Ignore:
Timestamp:
10/24/2018 12:01:03 PM (13 months ago)
Author:
pampfelimetten
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45159, comment 1

    initial v1  
    22We have 2 posttypes called "zeitungsausgabe" and "zeitungsartikel".
    33The rewrite of "zeitungsartikel is basically "zeitung/%zeitungsausgabe%/%zeitungsartikel%", which we resolve by setting custom add_rewrite_tag called "z" and adding custom rewrite rules and filter the post_type_link to account for it.
    4 It seems like the function url_to_postid doesn't account for custom rewrite tags, as it resolves the url to "zeitung//%zeitungsartikel%" - the custom rewrite tag is ignored. thereby it cannot properly resolve the url (but weirdly somehow still gets the title).
     4It seems like the function url_to_postid doesn't account for custom rewrite tags, as it resolves the url to
     5
     6{{{
     7"zeitung//%zeitungsartikel%"
     8}}}
     9 
     10- the custom rewrite tag is ignored. thereby it cannot properly resolve the url (but weirdly somehow still gets the title).