• Resolved dorian06

    (@dorian06)


    I would really like that Custom Post Type acts like Pages!
    What I want to do is to display this Custom Posts in the page.php

    Any help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Why not just use pages then?

    Thread Starter dorian06

    (@dorian06)

    Because is a huge site, and I would like to divide the admin panel in different sections in order to make it easy to add content. Also, I want to use Custom Post Types because when I define the post-type, I can easily add custom fields for each kind of post-type. It looks great! I don’t know how could I do this with pages!

    Do you have the post type created already? Are you just wondering how to display the pages? If so, how do you want to display them?

    Thread Starter dorian06

    (@dorian06)

    Its already created and its called ‘product’.
    I want to display post_type = product in pages.php
    Also, Im trying to get the post ID, and if it’s a ‘page’ works fine, but if post_type = product It doesn’t work.

    global $wp_query;
    $thePostID = $wp_query->post->ID;
    $theParentID = $wp_query->post->post_parent;
    $thePostTitle = $wp_query->post->post_title;
    echo "$thePostID";
    echo "$theParentID";
    Thread Starter dorian06

    (@dorian06)

    Thanks Michael, in Custom Post, should I be able to select the template? Because I don’t see the template attribute in my Custom Post Type (I can see it in normal pages).

    No. You have to code the template to display the post type you want.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom posts types display in page.php’ is closed to new replies.