Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts

    (wordpress modding pro needed) help making custom pages

    Hey,

    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.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,503
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    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.


    .

  • #3
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts
    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)

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,503
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    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?


    .

  • #5
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts
    Hmm, they are on different servers.

    Can you connect to two databases in any way?

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,503
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    I don't think so ...


    .


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •