WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed some calculators (in php) for my website and I need Wordpress integration. The calculators have a form and, after submission, the result is shown. The result depends on a query in the database. Is it possible to create "static pages" (at least static URLs) that provide to the user dynamic content?

Just to clearfy, I want something like:


I heard about Pages, but I cannot include php code on it. Worth point out that the calculators aren't static, the result will change everyday.

share|improve this question
up vote 0 down vote accepted

You do want static pages. The easiest way to do this, and a very good way even if perhaps not the only way, is:

  1. Create one or more custom template files for your static pages. This is where your PHP comes in.

    Template Name: Calculator
    // your calculator code 
    // Whatever PHP you have should work
    // This is very minimal. You may want something more complicated. 
  2. Save the file as some name not on the reserved list

  3. Create your static pages from wp_admin->Pages. Why creating the pages, save them with appropriate "Template"-- that is, one of the ones you've created. (Look in the right sidebar under "Page Attributes".)

This way, you can keep the calculator pages consistent with the other pages on the site.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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