Forums

include content from one page inside a different page? (6 posts)

  1. popart
    Member
    Posted 3 years ago #

    Ok, this should be easy, but I can't figure out how to do it...

    I'm creating a site for a client.

    I want to display content from a page called "Ads" in a different. So, all the client will need to do is log-in and edit the text in the "Ads" page. Then, their text will get placed into the ad on the site (on a different page).

    So, somehow I need to get_content or something for that page?

    Please help point me in the right direction. Thanks!

  2. popart
    Member
    Posted 3 years ago #

    bump

  3. figaro
    Member
    Posted 3 years ago #

    You could use an iframe. See example below.

    http://educhalk.org/blog6/?page_id=2

    If course, you would want to format your content so it would fit into the frame better, but that's not very difficult. Just Google iframe code to find out how to do it.

  4. popart
    Member
    Posted 3 years ago #

    Is iframes really the way to go just to get content from a Page within my WordPress site onto another page? (within the same site--I'm not bring in content from an external site.)

    I'm not trying to bring in the entire page, just the content (text) on that page.

    Can't I just say get post id ... something?? Thanks.

  5. popart
    Member
    Posted 3 years ago #

    I think I've found what I was looking for here:
    http://codex.wordpress.org/Template_Tags/query_posts

    Looks like this is what's gonna work:

    <?php query_posts('page_id=1');
    if (have_posts()) : ?>
    <div>
    <?php while (have_posts()) : the_post(); ?>
    <?php echo the_content('Continue reading »'); endwhile; ?>
    </div>
    <?php endif; ?>

  6. figaro
    Member
    Posted 3 years ago #

    Is iframes really the way to go just to

    It's one way to go...if you've found another, better way, then great. Glad you got it working.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.