0

I created a custom page 'page-channels.php'

since I get all the data from api requests I don't need or want to open a custom post type for channels but I would rather alter the behaviour of the page to act like it one (url wise and passing parameters wise)

for example :

example.com.com/channels : would open in page-channels.php

example.com.com/channels/sport : would open in page-channels.php will recognize the sport id and include code single-channels.php with sport variable

I was able to do that when I made my permalinks structure look like this

/%postname%/

But I only able to reach page-channels.php where I enter numeric values

for example: example.com/channels/12 would work

example.com.com/channels/sport wouldn't work

Would love if someone can shed some light on how can I resolve this.

I know that it can be achieved via query params but I rather not use it.

Thanks in advance,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.