• Resolved derekbeck

    (@derekbeck)


    Hi All,

    I created a dynamic php-driven newsletter page, which gives “hey, join my newsletter” by default, but the same page, depending on a variable passed in the URL, will also give things like “thanks for joining” or “you are now confirmed” or “sorry to see you unsubscribe”.

    That page’s code is in its own php file, and then I went into the core index.php of the (desktop) theme (Atahualpa) I’m using and forced that news php file to be called if the page being displayed was my newsletter page.

    Works great, no issues.

    But now, I have installed WPTouch for mobile users. Though it is a plugin, it is generating effectively its own theme for mobile users. The trouble is, now my newsletter page shows blank, because, indeed, the page as it stands in the WP database is blank, as it is only populated dynamically by the index.php for my desktop theme.

    Clearly, I need to populate this page in some fashion by using a file that is NOT part of my desktop theme, so that the mobile theme will render it as well.

    So, where do I put this call for my php code?

    The best solution would be to integrate it in a way so that I don’t have to hard code it in every time something (like WP) updates. I do this now to integrate it into my ATA theme, but this is a pain. If it involves building it as a plugin, I’ve never done this, but would appreciate you pointing me in the right direction on how to.

    Thanks so much for reading my long post!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘where to put custom php if using two themes (standard and mobile)?’ is closed to new replies.