[wp-hackers] Overriding the template
whsatterwhite at gmail.com
Sun Nov 18 22:11:09 UTC 2012
You could create a separate mobile theme then check for mobile user-agents
and serve the mobile theme by way of the template_redirect hook.
On Sun, Nov 18, 2012 at 5:01 PM, Christian Gundersson <christian at buro2.se>wrote:
> I've been asked to adapt an existing WP site to mobile, but the current
> "theme" (emphasis on the "") will be a nightmare to handle. The client also
> wants the structure and content to be slightly different on the frontpage.
> Oh, and I also don't want to muck with the urls and create a /mob/
> directory or subdomain or what have you.
> I had an idea that perhaps I could write a separate template file and
> maybe do a check-for-mobile/switch-to-mobile thing. Any thoughts and/or
> ideas how this could be done? Suggestions? I'll take anything really :)
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers