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

Share

Before this you should read the previous post that is How to add ccustome post type in wordpress

Its 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 like i did.

[code]
< ?php query_posts("posts_per_page=10&post_type=teamlogixproducts"); ?>
[/code]

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

[code]
category-portfolio.php
[/code]

and for single it will be

[code]

single-portfolio.php
[/code]

It will automatically recognized by the wordpress.

© 2018 IT Tech Developer | XML Sitemap | HTML Sitemap
Powered by T-Developers | Designed by: Shah Rukh | Thanks to Friends
show
 
close
rss Follow on Twitter facebook linkedin youtube google+ email