• (i) I have created a page called About Us.
    (ii) I wanted to show it as domainname/aboutus.php instead of domainname/?page_id=xxx
    (iii) So I created a page called aboutus.php in the same folder as index.php but the content is not showing up.

    Here is how I have called it:

    BEGIN

    <?php
    require(‘./wp-blog-header.php’);
    ?>
    <?php get_header(); ?>
    <!–general site stuff –>
    <?php query_posts(‘pagename=aboutus’); ?>
    <!–general site stuff –>
    <?php get_footer(); ?>

    END

    It is drawing a blank even when I call
    <?php query_posts(‘page_id=953’); ?>
    All the navigation stuff etc is showing up perfect.

    What can I be doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter subirghosh

    (@subirghosh)

    Sorry, forgot to add this in my previous post:
    <?php query_posts(‘pagename=aboutus’); ?> is followed by
    <?php the_title(); ?>
    <?php the_content(”); ?>

    The content does not show, but the title does

    When you create a page, look on the right hand side, there’s a section titled “Post Slug”. If you enter “aboutus” in that text box and save the post, you’ll find that you can link to it using domain/aboutus/ instead of the query string format. You don’t need to create an about.php as you described above.

    This works for normal posts as well.

    PS: On this forum, it’s better to use the EDIT link and edit your old post to add info, instead of replying to it. Some people (like me) look for posts with no replies first.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with static page’ is closed to new replies.