Title: Make a blog in a php script
Last modified: August 20, 2016

---

# Make a blog in a php script

 *  [Cameron Nicolson](https://wordpress.org/support/users/cameronnicolson/)
 * (@cameronnicolson)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/)
 *     ```
       <style type="text/css">
       <link href="style.css" rel="stylesheet" type="text/css">
       </style>
       <?php /* Template Name: WPBeginnerT1 */ ?>
   
       <?php get_header(); ?>
       <?php get_footer(); ?>
       ```
   
 * This is my code so far for a .php, it works great and it fetches the header and
   footer. What I now want to do is build blog to show posts for a staff blog.
 * What code will I need to add to do this?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610197)
 * [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * You can also look in the default theme for example code.
 *  Thread Starter [Cameron Nicolson](https://wordpress.org/support/users/cameronnicolson/)
 * (@cameronnicolson)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610206)
 * If I had a loop, where do you publish / tag the posts to make them appear on 
   that page?
 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610360)
 * You can use the loop to get all posts, or give them a tag/category and customize
   the loop to only get posts from that tag/category.
 *  Thread Starter [Cameron Nicolson](https://wordpress.org/support/users/cameronnicolson/)
 * (@cameronnicolson)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610362)
 * I was able to get the loop working, it displays posts in a specific category 
   and it links back to the post.
 * Any advice on how to make / add description box, comment button, share buttons
   to the items looped. Similar to posts listed on the front page?
 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610364)
 * Look at the code for the front page and do the same thing.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Make a blog in a php script’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [fonglh](https://wordpress.org/support/users/fonglh/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/make-a-blog-in-a-php-script/#post-2610364)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
