the_content() not showing content in plugin
-
I’m building a plugin which has some custom templates for my custom post types. In my single- file, the code below shows the header, title and footer but for some reason doesn’t show the content.
wp_enqueue_style('mjt_css', MJT_CLASS_CSS_URI.'/mjt.css'); get_header(); the_title(); the_content(); get_footer(); ?>
Here is the code creating the post type …
$args = array( 'labels' => $labels, 'public' => true, 'public_queryable' => true, 'exclude_from_search' => false, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_admin_bar' => true, 'menu_position' => 10, 'menu_icon' => 'dashicons-universal-access', 'can_export' => true, 'delete_with_user' => false, 'hierarchical' => false, 'has_archive' => true, 'query_var' => true, 'capability_type' => post, 'map_meta_cap' => true, //capabilities 'rewrite' => array ( 'slug' => 'trainer', 'with_front' => true, 'pages' => true, 'feeds' => true ), 'supports' => array ( 'title', 'editor', 'author', 'comments' ) ); register_post_type('mjt_trainer', $args);
Any tricks here that I’m missing?
Cheers …
Z
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the_content() not showing content in plugin’ is closed to new replies.