Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 3rd May 2011, 04:37 PM   #1
HyperActive Warrior
War Room Member
 
Join Date: 2010
Location: New Jersey
Posts: 140
Thanks: 14
Thanked 12 Times in 3 Posts
Default
Insertion?
Share on: 
fb share twitter share gplus share more share

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?
ReikiGirl is offline  
Unread 3rd May 2011, 05:31 PM   #2
Flying Waffle
War Room Member
 
Join Date: 2011
Location: Vancouver, Canada
Posts: 806
Thanks: 62
Thanked 208 Times in 158 Posts
Default
Re: Insertion?
Share on: 
fb share twitter share gplus share more share

Look for a plugin called execphp, it lets you execute PHP code in posts and pages.

Christian Little is offline  
The Following User Says Thank You to Christian Little For This Useful Post:
Unread 3rd May 2011, 07:59 PM   #3
HyperActive Warrior
War Room Member
 
Join Date: 2010
Location: New Jersey
Posts: 140
Thanks: 14
Thanked 12 Times in 3 Posts
Default
Re: Insertion?
Share on: 
fb share twitter share gplus share more share

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?
ReikiGirl is offline  
Unread 3rd May 2011, 09:09 PM   #4
Flying Waffle
War Room Member
 
Join Date: 2011
Location: Vancouver, Canada
Posts: 806
Thanks: 62
Thanked 208 Times in 158 Posts
Default
Re: Insertion?
Share on: 
fb share twitter share gplus share more share

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.

Christian Little is offline  
The Following User Says Thank You to Christian Little For This Useful Post:
Unread 4th May 2011, 07:57 AM   #5
HyperActive Warrior
War Room Member
 
Join Date: 2010
Location: New Jersey
Posts: 140
Thanks: 14
Thanked 12 Times in 3 Posts
Default
Re: Insertion?
Share on: 
fb share twitter share gplus share more share

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.
ReikiGirl is offline  
Closed Thread


Bookmarks

Tags
insertion


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:18 PM.