WordPress.org

Ready to get started?Download WordPress

Forums

One single template, 2 type of links to it: custom_post & taxonomy (5 posts)

  1. Iamzozo
    Member
    Posted 1 year ago #

    Hi!

    I've related posts on a single template. There is two route for this single template:
    - from taxonomy
    - from post type

    post_type/single-post link works.

    How can i create links for related posts if the route belongs to taxonomy (taxonomy/single-post). I check the route where the user comes from and decide the template appereance, but the "taxonomy/single-post" links in the related posts box gives 404.

    Another template with a name? Possible to generate another permalink to it?

    Thanks!

  2. David Gard
    Member
    Posted 1 year ago #

    I'm not sure I'm on the same page as you, but I think what you are looking for is away to display Posts within a Taxonomy Term?

    If so, take the following as an example -

    You have a custom Taxonomy called Movies, and Movies has 3 Terms - Horror, Comedy and Action. To display Posts that in in the Taxonomy Action you'd go to http://yoursite.com/movies/action.

    Hopefully I've understood that correctly...

  3. Iamzozo
    Member
    Posted 1 year ago #

    Almost, just to display one post, not the posts.
    So i have:
    - movie_type/movie-title
    - movies/action/movie-title (this is not working)

    movies/action with posts is okay.
    I check on the single post page, where the user comes from, i have to make changes on the template if the query based on taxonomy..

  4. David Gard
    Member
    Posted 1 year ago #

    movies/action/movie-title (this is not working)

    This would not work - effectivly you are saying post_type/taxonomy/term, which is not a structure that WP can understand (without adding complicated custom rewrite rules).

  5. Iamzozo
    Member
    Posted 1 year ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic