Ready to get started?Download WordPress


template hierarchy and urls (1 post)

  1. don1967
    Posted 9 months ago #


    Ive got a custom content type ( as is at moment ) - Categories.

    I have another custom content type - Holidays

    I am currently using categories to create a menu

    The idea is.. A user selects a category and all the holidays in that category are listed... A user would then be able to select a Holiday and view in more detail.

    MY problem is the urls and there after knowing how to develop my templates.

    problem 1)

    At the moment, when a user selects an option ( category ) , the url is /categories/{category name }

    I want the url to be /{category name } and not include the content type name...

    problem 2

    Given that there can be any number of categories and holidays,

    I then want to be able to click on a holiday to view in more detail but i require the url to be /{category name }/{holiday name}

    Is there a way to do this?
    Is there an alternative solution that will enable me to generically create a template that executes depending on the number of slugs/query string parameters?

    Any help would really be appreciated. Have been stressing on this all day.

    Thanks in advance


You must log in to post.

About this Topic