If I have a page with ID 123, I know my template file page-123.php will be called to render it, but if my theme is used across a network, could a page in a different site also have ID 123?

I assume, if so, that I'll need to sniff $current_site and requiring an alternate template file if it's not the site I'm targeting.

I already assume slugs aren't unique across a network.

3 Answers 3


Nope, they aren't unique.

So yes - you'd have to check current site and do that.... or use a theme with a custom menu?


Definitely not unique, sorry... Each blog's tables are prefixed with that site's prefix. You need to check for the current site/blog to make sure.



It is in my opinion, the best move here to make a template file and make sure your page (123 or whatever) uses that template.

That way you can use your theme and also share it to the network. An beginner will not mess with the template settings, and you'll avoid accidental formatting of pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.