Codex

Function Reference/get page

This page is marked as incomplete. You can help Codex by expanding it.

Description

Retrieves page data given a page ID or page object. Pages provide a way to have static content that will not affect things like articles or archives, or any other blog entry features of wordpress. Its simply a way to turn a blog entry into static content.

Wrong way: $p = get_page(2); // Error: Only variables can be passed by reference

Right Way: $n = 2; $p = get_page($n);

Get title: $p->post_title

Get Content $p->post_content