Forums

How to fall back to parent page/post category template? (1 post)

  1. guox
    Member
    Posted 10 months ago #

    For example,

    Page A
    -Page B
    --Page C

    URL: /page-a/page-b/page-c

    I understand that what ever url i put in, if the last part of the url match slug of any post in wordpress, it will go straight to that post.
    So for example. /page-a/page-b/pagexxx/yyy/page-c will show "/page-a/page-b/page-c".

    Is there a way to make it if there's any 404 or unknown slug, it will fall back to the last know slug? Eg. /page-a/page-b/xxx/yyy/aaa will show "/page-a/page-b/" without returning 404.

    Any clue?

Reply

You must log in to post.

About this Topic