• Resolved steve.slatcher

    (@steveslatcher)


    I have a template in my twentyten child theme that populates an archive page automatically, and it works fine for that child theme. I could give more details if you like, but I think it is quite a common thing to do and my code does nothing fancy.

    Is there any way to do get the same effect for my archive page in the Jetpack Mobile Theme? Currently on mobiles that page is empty when I have the Mobile Theme activated.

    I am on Jetpack 2.7, and my blog is here: http://www.winenous.co.uk/wp/

    Many thanks

    Steve

    http://wordpress.org/plugins/jetpack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    You should be able to move that custom template into a small plugin and add it to the Mobile Theme by following the instructions here:
    http://jetpack.me/2013/06/27/customize-mobile-theme/#throughactionsandfilters

    I hope this helps.

    Thread Starter steve.slatcher

    (@steveslatcher)

    Thanks Jeremy

    I don’t have much experience of hacking around with WordPress, but I think I see what you are saying. I should use the plugin in both my Twenty Ten child theme and the Mobile Theme, and ditch the page template, right?

    I see there are some 3rd part plugins that should do the trick, and I think I’ll try one of those. What I currently have in Twenty Ten child theme is not that great – I just put something together quickly, as I recently moved from K2 where I got an archive page automagically.

    Cheers

    Stev

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I should use the plugin in both my Twenty Ten child theme and the Mobile Theme, and ditch the page template, right?

    Yes, exactly. You can do so thanks to the template_redirect hook:
    http://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect#Loading_a_template_from_a_plugin

    You’re right though, there are probably plugins that do that already. 🙂

    Thread Starter steve.slatcher

    (@steveslatcher)

    Looks like I have found one to my taste already 🙂

    I hope to get into plugin writing at some time soon, but right now I want to get something running ASAP.

    Thanks again for your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using Page Templates in the Mobile Theme’ is closed to new replies.