Support » Fixing WordPress » Displaying a WP Page in an existing site

  • Ok, I really need help with this! I’ve been searching for the past week and it’s starting to get frustrating…

    I have an existing site that I’ve made for a client at http://www.behavehair.com,
    but he wants to use wordpress as a CMS so he can update his pages. I’ve already figured out how to insert his “News/Blog” section from WP into the site, but now I need to know how I can do the same thing, but with WP Pages instead.

    I need him to be able to sign into WP, add or edit content to whatever page, and have the WP content show up on the respective page on the existing site.

    I’ve succesfully done it by inserting “The Loop” into our sites “News” section, and it’s working perfectly, but I just can’t seem to find any information on how to do the same thing with the pages!

    I know I must be super close to figuring it out, and it’s probably something super simple, but I just can’t waste any more time wandering around in the dark!

    SOMEONE PLEASE HELP!!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter artwood

    (@artwood)

    Thank you for your help Esmi,
    But I’ve already read that page 10+ times!! lol.
    I keep getting reverted back to that page but it doesn’t have the info I’m looking for. It’s for displaying Posts and converting your entire site to a WordPress theme. I need my Pages content to show up, not the Posts.

    I know it has to be some little PHP tag that I can use, but I don’t know very much about PHP! lol.

    FML!

    It’s exactly the same process for Pages as it is for Posts.

    Thread Starter artwood

    (@artwood)

    That’s what I was thinking, but what is the PHP tag that you use to display a certain page?

    For my News page(which is working perfectly),
    I have changed the HTML page to a PHP page, and I have this code at the very top of the page:

    <?php
    // Include WordPress
    define('WP_USE_THEMES', false);
    require('../wordpress/wp-load.php');
    query_posts('showposts=5');
    ?>

    …and then I’ve placed these lines of code, “The Loop”, where I want the post/page to display.

    <div class="news_entry">
    <?php while (have_posts()): the_post(); ?>
    <h4><?php the_title(); ?></h4>
    <?php the_excerpt(); ?>
    <div class="read_more"><a href="<?php the_permalink(); ?>">Read the rest...</a></div>
    <?php endwhile; ?>
    </div><!-- END "NEWS_ENTRY" -->

    So if it’s exactly the same process, I’m guessing my problem is this line at the top of the page:

    query_posts('showposts=5');

    …because I don’t want to show 5 posts, I only want one specific pages content to show. I found the pages ID, which was “p-15” and placed it in there instead.

    query_posts('p-15');

    Am I missing something?
    Thank you again for your help :))

    Thread Starter artwood

    (@artwood)

    Thank You esmi, I’ll try that and see where that gets me. I actually found another way to do it as well. On the “Pages” section of the codex there is a link to a plugin called “Page Includes” or something like that. I installed the plugin and now all I have to do is insert this line wherever I want the Page Content to show up:

    <?php iinclude_page(15); ?>

    Simple as that!
    But now my problem is how to make the content appear correctly. I have some formatting issues with the CSS. Back to the Codex!! lol. I’ll figure it out though.

    Thank You again for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Displaying a WP Page in an existing site’ is closed to new replies.