4 replies
Not the dirty kind!

I wanna know on wordpress after I've created a page, I want a database table to show in the text area.

<?php
echo displayGirls();
?>

This is what I'd like on there - but apparently you can't insert php code into the text area?

Help? Pretty please?
#insertion
  • Profile picture of the author Christian Little
    Look for a plugin called execphp, it lets you execute PHP code in posts and pages.
    {{ DiscussionBoard.errors[3820139].message }}
    • Profile picture of the author ReikiGirl
      Originally Posted by Christian Little View Post

      Look for a plugin called execphp, it lets you execute PHP code in posts and pages.
      So here's the thing though, normally in my other php page where I show the table...at the very top it calls the setup.php and the display.php but I'm not sure how to get it to insert that BEFORE the head tag doing it through wordpress. I know I could just change the header.php and duplicate it for just the one page I am setting up, but I don't know how to call the new header1.php for the one page?

      Make sense?
      {{ DiscussionBoard.errors[3820688].message }}
  • Profile picture of the author Christian Little
    Ahh...what you want is a page template. Basically wordpress lets you create subtemplates that you can set pages to use that are part of your theme but are only called from specific pages.

    Here's a brief section that explains how to do it: Pages « WordPress Codex

    But basically you create a new .php file (i.e. page2.php) in your themes directory and copy everythign that's inside of page.php into it. Then at the very top put some comment code in to name the template.

    Then you go to whatever page you are doing this for, and select the template from the menu on the right when editing the page.
    {{ DiscussionBoard.errors[3821001].message }}
    • Profile picture of the author ReikiGirl
      Originally Posted by Christian Little View Post

      Ahh...what you want is a page template. Basically wordpress lets you create subtemplates that you can set pages to use that are part of your theme but are only called from specific pages.

      Here's a brief section that explains how to do it: Pages « WordPress Codex

      But basically you create a new .php file (i.e. page2.php) in your themes directory and copy everythign that's inside of page.php into it. Then at the very top put some comment code in to name the template.

      Then you go to whatever page you are doing this for, and select the template from the menu on the right when editing the page.
      Makes complete sense - gonna try it today.
      {{ DiscussionBoard.errors[3823624].message }}

Trending Topics