Suppposed to be, I had custom database table in wordpress:
Let us say:
table with fields:
something like this:
Now, I want to display the data from that table to a custom post type i created:
Is that possible? Please help me. Thanks!!!
Let us say:
Code:
wp_messages
Code:
from, title, subject, body
something like this:
Code:
_____________________________________________
| from | title | subject | body |
---------------------------------------------
| JohnDoe | Test | Hello | World |
---------------------------------------------
| JaneDoe | Test2 | Hi | WordPress|
---------------------------------------------
Now, I want to display the data from that table to a custom post type i created:
Code:
function create_post_type() {
register_post_type( 'messages',
array(
'labels' => array(
'name' => __( 'Messages' ),
'singular_name' => __( 'Message' )
),
'public' => true,
'has_archive' => true,
'menu_position' => 8
)
);
}
add_action( 'init', 'create_post_type' );
Is that possible? Please help me. Thanks!!!