- This topic has 3 replies, 3 voices, and was last updated 5 years, 1 month ago by alexmarcxyz.
-
AuthorPosts
-
December 15, 2014 at 6:56 pm #19413spectrum_7Participant
I am using the Events Manager plugin which creates a custom post type: EM_POST_TYPE_EVENT. I would like to feature these events in the slider. When I add the id into the slider options, the ‘Click Here To Edit’ button works and connects to the custom post. However the featured image does not show up in the slider.
I added the custom post type into the array at line: 503 of header-extensions.php like this:
'post_type'=> array( 'post', 'page' , 'EM_POST_TYPE_EVENT' ),
Do have any advice on how to achieve this?
Thanks.
December 16, 2014 at 5:36 am #19421spectrum_7ParticipantOkay I figured it out…
I had the wrong name for my custom post type. =(. I put in the right name into the array and copied the whole function over to my functions.php file and it works great.
December 16, 2014 at 5:54 am #19425Theme Horse Support TeamKeymasterOk that’s great spectrum_7
Thank you!
March 14, 2019 at 6:56 am #61331alexmarcxyzBlockedGo to function.php file from your theme directory and then add this code to it:
/* Custom Post Type Start */
function create_posttype() {
register_post_type( ‘news’,
// CPT Optionsarray(
‘labels’ => array(
‘name’ => __( ‘news’ ),
‘singular_name’ => __( ‘News’ )
),
‘public’ => true,
‘has_archive’ => false,
‘rewrite’ => array(‘slug’ => ‘news’),
)
);
}
// Hooking up our function to theme setup
add_action( ‘init’, ‘create_posttype’ );/* Custom Post Type End */
Once this code will be added, you will see the new post added into the dashboard, for creating custom post type WordPress you can follow this guide, it has all 3 types of posts tutorials.
-
AuthorPosts
- You must be logged in to reply to this topic.