Balkhis - Vision For Success

Raw Code method to make a custom blog page in wordpress

Dear Readers, I would like to thank you for reading this post. I highly value your feedback and would like to know more about my readers. Follow me on Twitter

When I first started Balkhis, I wrote about Creating your own Custom wordpress page in which I discussed two ways to making a custom wordpress homepage, but I only shared one method of making a custom blog page and that was through the WP-admin method.

I recommend the users to read the post I just linked to above before continue reading this one because you won’t get lost if you read that post first.

Well, sometimes you might not want to use the WP-Admin functions to set custom homepage and separate blog page. Therefore you will go ahead and use what I called the Raw Code method to make a homepage.

Now you want to make a blog page, so in this post I will be sharing the codes to display your posts in wordpress through RAW Codes.

Basically just copy and paste the codes below in your page-blog.php or whatever you want to call that file.

<?php $page = (get_query_var(’paged’)) ? get_query_var(’paged’) : 1; query_posts("showposts=15&paged=$page"); while ( have_posts() ) : the_post() ?>

Change the 15 to whatever you like and it will be the number of posts shown on that page. Now you need to follow rest of the index.php settings to align the posts and all the good stuff.

I will put an example of a text file that you can use:

The above page should do the job well. Now you have the code to display latest posts on any page of your blog by just adding a simple .php file.



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed | Trackback URI

5 Comments »

Comment by Tech blog
2008-07-05 09:39:46

how it is different than the usual wordpress pages :? ?:


Comment by Syed Balkhi
2008-07-05 14:38:15

Well this is a blog page like

http://www.balkhis.com/blog/

This is just a way to display your posts manually, so you can display it on more than one page.

If I am still not clear, let me know and I will explain clearly.


Comment by Michael Aulia
2008-07-05 19:13:31

Ah.. so it’s like having another WordPress blog’s home page? (just the “Home” page though)

Don’t know what to use it for, I guess, but it’s good to know that it exists (in case we want to create another one)

(Comments wont nest below this level)

Comment by Syed Balkhi
2008-07-05 21:55:19

Well you see how Balkhis is running. I am not using the wordpress admin panel area like setting two pages and making one the blog and one the homepage.

I am just using the raw codes because I do better with those.


 
 
 
 
2008-07-06 07:31:05

[...] my last post, I showed you guys how you can display latest blog posts on a custom page in wordpress using the Raw Code Method. Now I had a number there to show how many posts you want to display. But sometimes people [...]


 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email