Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
If I'm understanding you, this is my solution. Use the server variable to get the root of your site, then give the path to the page. WordPress also has some variables for this I believe.
PHP:
include $_SERVER['DOCUMENT_ROOT'] . '/path2/page.php';
 

sbryan

macrumors member
Original poster
Jun 6, 2007
96
0
If I'm understanding you, this is my solution. Use the server variable to get the root of your site, then give the path to the page. WordPress also has some variables for this I believe.
PHP:
include $_SERVER['DOCUMENT_ROOT'] . '/path2/page.php';

Angelwatt, I did give that a try, but because I'm referencing the php document out-of-the-loop, it's not grabbing the information I want.

There may be another way besides creating a page in Wordpress, which I'm trying to do currently, but there seems to be no information on creating a dynamic (editable) sidebar.

Frustrating! Thanks for the reply.
 

brisbaneguy29

macrumors 6502
Nov 27, 2007
370
1
Brisbane
First you need to set your functions.php file to register the 2 sidebars. If you don't have one, create a functions.php file and put it in your theme folder.
PHP:
<?php
if ( function_exists('register_sidebars') )
register_sidebars(2);
?>

Then create a second sidebar PHP file, call it sidebar2.php. To inset the second sidebar use
PHP:
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

You can use this to include any number of sidebars, and can have different pages with different sidebars, showing different information. Doing it this way will allow you to edit the sidebars in the admin through Widgets.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.