Forums

Including Page Content from Other Pages (4 posts)

  1. pkamm
    Member
    Posted 3 years ago #

    I'm trying to create one page from content of other pages. These are all pages; not posts.

    So, for example, HomePage will be comprised of the content from 3 other pages (PageOneConent, PageTwoContent, and PageThreeContent), in addition to what is entered into the HomePage editor itself.

    I'm doing this because in between the content I have inserted into the template various Javascripts for image rotations, dropdown menus, etc. These Javascripts are in the template because they break if they are in the WYSIWYG editor.

    Any thoughts on how to do this?

    Thanks.

  2. whooami
    Member
    Posted 3 years ago #

    maybe this will help?

    WordPress plugin: Improved Include Page

    I set that up on another site recently. I used it to include a page within a template file.

  3. MichaelH
    Volunteer
    Posted 3 years ago #

    A simple way, with a plugin:
    http://aralbalkan.com/1016

    or

    use a Page Template with a query_posts loop with something like this {untested} code that shows page ids 2 and 23:

    <?php  $page_query = new WP_Query(array('post_type' => 'page', 'post__in' => array(2,23))); ?>
    <?php while ($page_query->have_posts()) : $page_query->the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
    <?php echo 'this is the id ' . $post->ID; ?>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <?php endwhile; ?>
  4. exit6
    Member
    Posted 2 years ago #

    That code works like a charm.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.