Jump to content

Recommended Posts

Posted

Hello,

 

I'm just starting to play with PHP and I've also been playing around with WordPress for a little while.

 

My site has a WordPress blog in a subdomain (blog.matthewmeyer.net) and I wanted to know if it is possible to use PHP in my regular site (matthewmeyer.net) to reference files from the blog the same way wordpress does.

 

For example, WordPress's index.html file references the header.php, footer.php, index.php, sidebar.php, etc. from whatever them you are using, so you just have to use PHP to place the header or footer or whatever in your page.

 

I'd like to be able to reference the header, footer, sidebar, etc. as well from my main site... sort of to create a portal that leads to my blog as well as other pages... but is built from the same files as my blog.

 

Is this possible?

Posted

You should be able to include the files,

 

why not try it

 

include ("blog/header.php");

in a test.php file

 

to see what happens.

Thats half the fun :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...