• Resolved s_nlchan

    (@s_nlchan)


    Hi, I just installed wordpress yesterday. I have been reading the doc. However, I seem can not find exactly what I am looking for. I have an one page php hangman game with external css, and images that I would like to embed it in the middle of the site. So I need a page that only include my header, footer, and side bar, and then I can embed the game script.

    I made a page called game.php and use

    <?php

    include_once(“/themes/mythemes/header.php”);
    include_once(“/themes/mythemes/sidebar-right.php”);
    include_once(“/hangman.php”);
    include_once(“/themes/mythemes/footer.php”);
    ?>

    And put that into my root.

    But it does not work at all. I don’t know php that much.

    Can somebody give me some help? How do I make a page that will work like that?

    Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I believe you would want to create a Page Template, and in that page template ‘code your stuff’ then associate that Page Template with a Page.

    Thread Starter s_nlchan

    (@s_nlchan)

    I know I am asking stupid questions here.

    But I read through the page template and page lessons and followed all the instruction but I just can not make it work….. I make a page with the following codes:

    <?php get_header(); ?>

    <?php get_sidebar(‘left’); ?>

    <?php get_sidebar(‘right’); ?>

    <?php get_footer(); ?>

    I named it game.php.

    I think this should make a page template with no content inside. Then I went to admin/new page and make a page called game. But it does not give me anything. I am using the i3theme. Can someone please show me step by step on how I can make a empty shell? I spent the whole day today to try to make it work. I really don’t know what I should do now…

    So your game.php file in your theme folder should be:

    <?php
    /*
    Template Name: Game
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php get_sidebar('left'); ?>
    
    <?php get_sidebar('right'); ?>
    
    <?php get_footer(); ?>

    Then you should be able to use Pages->Edit on your game page and associate the Template Game to the Page Game.

    Thread Starter s_nlchan

    (@s_nlchan)

    Oh. Now I got it. Thank you very much for all of your help. I thought and made it too hard…. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to embed an external program with wordpress’ is closed to new replies.