Front-end Web Developer | Tampa, FL

How to display Category (Blog) in WordPress Pages?

Posted on: February 22nd, 2010 by admin No Comments
  • Next create new Category with name Blog:
    Display Blog in WordPress Pages
  • 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:
  • {CODE type:php;}<?php if (have_posts()) : ?>{/CODE}


    and add this code:


    {CODE type:php;}query_posts(‘cat=3’);{/CODE}


    So we got this:


    {CODE type:php;}<?php query_posts(‘cat=3’); if (have_posts()) : ?>{/CODE}


    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:

    Display Blog in WordPress Pages

    Comments are closed.