Support » Fixing WordPress » Calling PAGE content into Index.php

  • Resolved pshero


    Hey gang. I’m hoping one of you PHP geniuses can help me out. I’m trying to replace the standard index.php content area (where the most recent posts are typically displayed) with the content from one of my wordpress PAGES (yes a particular PAGE, not a post). I’m crap at coding php, and I’m wondering if anyone could help show me how this script should be written.

    Thanks a million!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You may be better off just setting that Page as the home page of your site through the Settings > Reading screen in the dashboard.

    If not, then add <?php query_posts('page_id=1'); ?> (replacing “1” with the appropriate Page ID) just before the loop (which starts with <?php while (have_posts()) : the_post(); ?>) in your index.php theme file.

    – Tim

    PERFECT! Works like a charm. Also thanks for the tip on the start page designation feature, I never even knew that was there!

    Thank you so much Technokinetics!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling PAGE content into Index.php’ is closed to new replies.