• Resolved lapicj

    (@lapicj)


    Hi,

    I am new to WordPress and I am trying to setup a form that will write to a MySQL database. I have the form written but I am now trying to get it to work within a wordpress page.

    At first I places it in a page draft and it worked fine. Until I published the page and now it no longer works. In the visual and html editors it is there but not on the actual published page.

    From what I have read in other posts I need to place this form into a template. I started first by placing a shortened version of the form into a template making sure to call out the template name at the top of the php page.

    I created a new page, selected the template I had just created and published it. However, the page and the source code for the page are completely blank.

    What steps am I missing?

    Any help would be appreciated.

    thanks!

    Jim

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter lapicj

    (@lapicj)

    Is it possible that something is corrupted with my theme or wordpress install?

    I tried a very simple template like this:

    <?php
    /*
    Template Name: template-test-2
    */
    ?>
    <?php get_header(); ?>

    This still resulted in a blank page when I used this template for a new page.

    Jim

    did you include your footer too?

    get_header

    form code

    get_footer as a minimum should work

    Thread Starter lapicj

    (@lapicj)

    I tried

    <?php
    /*
    Template Name: template-test-2
    */
    ?>
    <?php get_header(); ?>
    <?php echo(“hello world”); ?>
    <?php get_footer(); ?>

    I also tried you minimun above of

    <?php
    /*
    Template Name: template-test-3
    */
    ?>
    <?php get_header ; ?>
    <?php echo(“hello world”); ?>
    <?php get_footer ; ?>

    Just to make sure.

    Am I correct in understanding that I do not have to put anything in the page itself through the wordpress visual/html editors and that it can all be in the template?

    Thanks,

    Jim

    Yes, it’s how I do my themes archive page, an index of everything on my site.

    <?php
    /*
    Template Name: template-test-2
    */
    ?>
    <?php get_header(); ?>
    <?php echo("hello world"); ?>
    <?php get_footer(); ?>

    This really oughta work…?

    Maybe drop this template into the twentyten theme, and see if it works there…. just to see if you can assign it…. see if its theme or something else? Maybe a plugin interfering

    Thread Starter lapicj

    (@lapicj)

    Thanks Rev Voodoo,

    I’m using the Atahualpa theme. I’ll first try disabling all the plugins and see if that works. If it does I’ll narrow it down to which one. If not I’ll try the twentyten theme.

    Does wordpress still interact with a plugin if it is disabled meaning do I need to completely remove the plugins or will disabling work?

    I’ll start testing now.

    Thanks.

    Disabling it should work

    I just ran into a problem, today actually, where I had to go a bit further. But that’s the first time in nearly 3 years with hundreds of troubleshoots

    Thread Starter lapicj

    (@lapicj)

    So far disabling all of the plugins did not work. The published page still shows blank. I then removed the 4 or 5 plugins I had not started using and kept the other 9 plugins disabled. That also did not work.

    The template DOES work in the draft/preview mode but not once published.

    Does that help narrow it down?

    I’m going toi try the theme switch next.

    Thanks,

    Jim

    <?php
    /*
    Template Name: template-test-2
    */
    ?>
    <?php get_header(); ?>
    <h1>TESTY TEST TEST FLIPPIN TEST!</h1>
    <?php get_footer(); ?>

    this would be about as simple as possible for outputting something just plain old text…..

    Thread Starter lapicj

    (@lapicj)

    Ok, I’ll try that. I did switch out templates but with no luck. I even tried the default template and it still gets me a blank page when published but works in draft.

    Give me a few minutes while I try your test.

    thanks,

    jim

    Thread Starter lapicj

    (@lapicj)

    Nu luck. It works in draft only not published.

    That was tested in the Atahualpa and default themes.

    However, something I did realize is that with my test template the header and footer did not show while they do with yours. Still only in the draft but why is that if you used the same code to call the header and footer?

    I’ll try removing all of the plugins next.

    Thanks,

    Jim

    Yup, that’s pretty bizarre….. I’m not real sure what could be getting in the way of yur templates functioning now……

    Thread Starter lapicj

    (@lapicj)

    Well I see the difference in your code and mine. I have () after get_header and get_footer. Still it only works in draft.

    I’m removing plugins now.

    jim

    Thread Starter lapicj

    (@lapicj)

    Ok. ALL plugins have been removed. I removed one at a time and tried your template with a brand new page after each plugin removal. No luck.

    I think I am going to try contacting our hosting company on the off chance this is something they’ve seen before.

    After that I will try reinstalling wordpress. Maybe something is just corrupted.

    Thanks for your help. I’ll update this one way or the other after I try these last options.

    Thanks again,

    Jim

    Thread Starter lapicj

    (@lapicj)

    I tried tech support but all they could tell me is that they do not have any manuals for installing themes or templates. So I just wiped and reinstalled wordpress.

    Everything is all hunky-dory now. So all I can guess is that something was corrupt with the install. I don’t know what but I do hope that it does not happen again.

    Thanks again Rev Voodoo,

    Jim

    I’ve never seen that happen….. hopefully you’ll be fine now! Glad you got through it!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Placing a form in a page template’ is closed to new replies.