• I can only show my custom post types after a regular post. If I place the code for the custom post type before the regular post on a page, the regular post disappears. What shall I write in functions.php so that I can start a page with a custom post type?

Viewing 1 replies (of 1 total)
  • If you are using query_posts() to show both types, you need to save the query for the regular posts before doing the query for the custom ones. Then, restore it afterwards.

    Either that, or use the $myquery = new WP_Query() approach for the custom ones.

    See the Codex on Multiple Loops.

Viewing 1 replies (of 1 total)

The topic ‘Custom post type’ is closed to new replies.