View Full Version : (wordpress modding pro needed) help making custom pages

08-28-2011, 07:17 PM

I am trying to make a file similar to page.php in wordpress, but I don't quite understand how it works and I don't want to have to create a database entry for every file in the database.

I'm not sure if the above is really the way to do it, but this is what I want:

I want to replace the sidebar contents with items selected from a database and the content div with another item selected from a database.

I only want to do this though " if(isset($_GET['lang'])) "

If I could get some assistance with how to replace the sidebar and content contents with this if the condition is met that would be great.

Thanks a million.

08-29-2011, 12:42 AM
First, create a new sidebar script similar to the one in your theme directory.
Perhaps you might call it "sidebar2.php".

Next, you'll be editing the "page.php" script.
There will be a part in there that loads the existing sidebar.

Every theme is different, so I can't tell you what it's going to show now,
but you'll be telling it to display your new sidebar instead ... if some condition is met.


I want you to elaborate on what is supposed to happen, because $_GET doesn't
seem like the way you should be looking for some language specification?

If a different sidebar should be displayed based on the user, you should be setting a
cookie on their PC, so they will always see the alternate sidebar.

I'm just not sure what it is you're trying to accomplish.


08-29-2011, 06:21 PM
Basically, I want to be able to put the content from my other site http://zonimer.com/ except for the home page content onto mmhudson.com (so that you can see the tutorials on both)

The $_GET part is just a form of navigation (the same one I used for zonimer)

08-29-2011, 10:57 PM
Are both sites on the same server?
By that, I mean can you access MySQL from both sites ... on the same server?

I assume zonimer is using MySQL for the database?


08-29-2011, 11:41 PM
Hmm, they are on different servers.

Can you connect to two databases in any way?

08-30-2011, 04:06 AM
I don't think so ...