Let us the page i am exhibiting has got the title "About" and also the id is 49. It is possible to method to change it out therefore it pulls the web pages title rather than the id.

Right now the code I'm using is the following:

    while (have_posts()) : the_post(); ?>
    <?php the_content();

Interesting help!

Get WordPress Post ID from Post title

Found this for you personally. You need to be cautious however, because game titles from posts and pages can alter. I am sure you've your reasons.


This might be better really... http://codex.wordpress.org/Function_Reference/get_page_by_title

I made use of such like on the project, while using post's slug save this inside your theme's functions.php:

if ( ! function_exists( 'get_content_by_slug' ) ) :
 * Get content using a slug
 * @param   string
 * @return  string
function get_content_by_slug($page_slug) {
    $page = get_page_by_path($page_slug);
    if ($page) {
        $page_content = $page->post_content;
        $page_content = apply_filters('the_content', $page_content);            
        return $page_content;
    } else {
        return null;


<?php echo get_content_by_slug('page-slug'); ?>