You are currently viewing How to Show Custom Post Type on front end in Different Templates

How to Show Custom Post Type on front end in Different Templates

Before this, you should read the previous post that is How to add custom post type in WordPress

It is so easy to call the custom post types at the front end.

First, we see how to show these types in a separate Template.

just add the Post casino online type in the post_type attribute in the query post function as I did.

< ?php query_posts("posts_per_page=10&post_type=teamlogixproducts"); ?>

And the remaining query is the same one that used in every template.

How to make its category file.

Its also easy Just add a dash and the slug of the custom post type. as i did

category-portfolio.php

and for single it will be

single-portfolio.php

It will automatically recognized by the WordPress.

This Post Has 9 Comments

  1. mrshahrukh123

    Its so easy Thanx

Leave a Reply