[wp-trac] [WordPress Trac] #45159: Embed template not loaded with certain custom post types

WordPress Trac noreply at wordpress.org
Wed Oct 24 11:49:42 UTC 2018


#45159: Embed template not loaded with certain custom post types
----------------------------+------------------------------
 Reporter:  pampfelimetten  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Embeds          |     Version:  4.9.8
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by pampfelimetten):

 Update: I'm pretty sure meanwhile it has something to do with the custom
 rewrite rules we use for this custom post type.
 We have 2 posttypes called "zeitungsausgabe" and "zeitungsartikel".
 The 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.
 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).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45159#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list