• Hi,

    On my frontpage i got lots of posts. But i need an area with text and pictures underneath all the posts. I need this area to be writeable.
    It means that every time i update my page/post, the change will be seen on my frontpage.

    I think i need to make an include-tag like
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    and so on…

    But in the examples above i am including php-files. I need some code that make it possible to include a page or post instead.

    Is that possible?

    Maybe I can use:
    <?php get_posts(‘arguments’); ?>
    ??

    In other words I want to include a post/page in my single.php file.

    Best regards, Jowiii

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jowiii

    (@jowiii)

    The include works with this
    <?php
    query_posts(‘page_id=8’);
    ?>

    in the single.php file.

    BUT.. my frontpage includes the content of page8 infinitely many times. The website doesnt stop loading, because the frontpage just loads the included file again and again.

    How can i tell WP only to load/include page8 one time?

    Jowiii

    Try:

    <?php if( is_front_page() && !is_paged() query_posts('page_id=8');?>

    Thread Starter jowiii

    (@jowiii)

    Hi,
    Thanks for answer – but it doesnt work.
    Error: Parse error: syntax error, unexpected T_STRING

    My bad – there was a missing ‘)’.

    <?php if( is_front_page() && !is_paged() ) query_posts('page_id=8');?>

    Thread Starter jowiii

    (@jowiii)

    No error, but nothing happens ?)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Including a post/page in single.php’ is closed to new replies.