Grow your CSS skills. Land your dream job.

creating WP “pages” locally?

  • # June 22, 2013 at 8:14 pm

    so as most of you know by my hundreds of WP related forum posts im new to wp lol….im working locally and have everything set up for the most part…. the last thing is that i want to have a blog page of just recent blog entries……is it possible to create a WP “page” locally or do i have to do it in the dashboard the traditional way? and if i can create a page locally how does wp recognize that its a page and not just a php file?

    # June 22, 2013 at 9:36 pm

    you have to include a comment to the top of the php file with the template name.

    Template Name: My blog posts.

    then you will have to create a new page to the wp dashboard and chose as a page template the one you created.
    this selection is made in a widget placed to the right.

    # June 25, 2013 at 9:31 pm

    wait…can i just create a new page the traditional way and put the php code for get recent posts?

    # June 25, 2013 at 9:38 pm

    In your dashboard go to:

    Pages >> Create Page >> Name it “Recent” >> Then in your theme folder create `page-recent.php` put your (http://codex.wordpress.org/Function_Reference/wp_get_recent_posts) in this file. [code](http://codex.wordpress.org/Function_Reference/wp_get_recent_posts) in this file.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".