• Resolved KB

    (@hardaka)


    Greetings,

    I’m building a website for a friend, and I’ve found out the way she has it hosted, she won’t be able to use wordpress. And I was building it with wordpress..

    My PHP knowledge is weak, but I’ve been able to figure out and alter the PHP in the themes, eventually, and I thought I could get it to work without wordpress, but so far it’s been a total failure.

    Is WordPress’ PHP different somehow?

    I tried making this a webpage.

    <html>
    
    <?php get_header();?>
    <div id="main">
    	<div id="content">
    
    Type in content here.
    
          </div>
    	</div>
      <?php get_sidebar();?>
      <?php get_footer();?>
    
    </html>

    I just cleaned up everything, and I thought it should still call the header, sidebar, and footer? But it doesn’t, just has errors. And I put the header, sidebar, and footer php files (from the theme) into the same folder as my index, so they should be there to find?

    Anyway, if anyone can think of something that could make this work, I’d be thankful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • These:

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    refer to WordPress-specific functions. Without WordPress, you cannot use these functions. Instead, use the PHP include() function, like so:

    <?php include('header.php'); ?>
    <?php include('sidebar.php'); ?>
    <?php include('footer.php'); ?>

    Finally, note this is desperately skirting the edge of non-WordPress support help…

    Thread Starter KB

    (@hardaka)

    Thanks, that got it working.

    And sorry, I thought this was the best place to ask, since it involved WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to make a website work without WordPress?’ is closed to new replies.