How to display Category (Blog) in Wordpress Pages?
In my last project i have a menu with follow pages: Home, Services, Portfolio, Contact, Blog. And in Blog Page should display Categories. How to transform WordPress Pages to the Categories?
Log in to the WP admin:
Log in to the WP admin panel: http://YourSite.com/wp-admin/
Create new Page with name Blog:
Next create new Category with name Blog:
Open folder: wp-content/themes/YourThemeName/ create new file with name page-blog.php.
Open archive.php copy all code and past to page-blog.php.
In page-blog.php find line:
<?php if (have_posts()) : ?>
and add this code:
query_posts('cat=3');
So we got this:
<?php query_posts('cat=3'); if (have_posts()) : ?>
Where 'cat=3' is ID of Your category. To find out what is your Blog ID. In admin panel click on Posts -> Categories -> Blog and view URL: