Support » Plugins » Single page entry

  • Hi there,

    I’ve got some old pages coded in php with inline css styles – I want to add them to my newly installed WP site. I can use pages – but then I’d have to avoid php-scripts.

    Is there any way I can do a framework of a “blank” WP default page, and do an
    <?php include ("mypage.php"); ?>
    , in the empty area?


Viewing 10 replies - 1 through 10 (of 10 total)
  • you could make a template:

    Template Name: My page
    <?php get_header(); ?>
    <?php include("mypage.php"); ?>
    <?php get_footer(); ?>

    put it in the correct theme folder, then make a page and use that template for it (select from dropdown in Page Options below the textarea). Or whack all the code in there instead of include()

    Hmm – didn’t see that option. Thanks 🙂

    How can I get the sidebar in there also?

    Well, I have it in my footer template so it comes along with get_footer(). The main template should show in which order to put the calls. You get the sidebar with <?php get_sidebar(); ?>

    just a note, i wanted to add the sidebar to single posts. so in single.php at the bottom right above the get_footer call, i put the get_sidebar call just like the index page has. but it always put the sidebar far down on the right hand side, below the post! i finally figured out at the top of single.php modify
    <div id=”content” class=”widecolumn”>
    <div id=”content” class=”narrowcolumn”>

    Radial–>I figgered out the same thing this morning but…do you get the *whole* sidebar? I’m only getting the default sidebar when I also would like to have add-ons like keywords, polls, and recent_comments (all plugs) in Single posts.

    The whole sidebar, including plugin mods, shows up fine inside Archives, just not in single posts. After inspecting code in sidebar.php, single.php, archive.php, even template_functions_…I’ve started looking for tests somewhere in The Loop that might be stripping out these plugin calls, but so far nothing’s jumped out at me…

    Can anyone advise?


    which theme? link?

    aw, geez…I *knew* this would happen sooner or later. Its not public yet. But if it helps:

    As I suspected 🙂 It is based on the Deafult and that handles the sidebar differently depending on what you are viewing. OK, I know, you are past that… but if your sidebar.php template is based on K. you can see there (at least in the original!) a lot of if statements, saying to show this and that depending whether you are on a single, archive, category etc. page. I guess some of that code is in your sidebar.php, thus showing and hiding different portions of it depending on what you are viewing.

    Thanks, Moshu…now that you mention it, I do remember seeing some tests like that in the past (when I didn’t care!). Guess I’ve gotta look a little harder!


    Sure enuf, it was simple…even simpler than I suspected! Turns out sidebar.php itself contains the test. I had all these extra widget calls *outside* the if…then test. Simply moving them inside did the trick.

    It was literally staring me in the face the whole time. DOH#@!


Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Single page entry’ is closed to new replies.