Raw Code method to make a custom blog page in wordpress
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.
Here is whatever you can put any html code you like.
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:




















Hey, I am Syed Balkhi, The guy who is behind Balkhis Inc. I entered the industry back in 2002 not knowing a single thing. I barely spoke English at that time. In the past six years, my language barrier has been eliminated. Aside from English, now I also speak html, and php. Along with the languages I have also managed to master a few arts. Art of web-designing started when I first entered. Messing around with photoshop, I learned how to create my first web design. Now I founded a web designing firm Uzzz Productions. After running numerous amount of websites in various niche, I have mastered the art of web-development. Now I am compiling a resource of what I already know, and what I am learning on this blog. This resource is to help me if I ever need a guide to look back to, and it is help my fellow webmasters.




how it is different than the usual wordpress pages :??:
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.
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)
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.
[...] 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 [...]