I had created custom post type called "Case Studies" for my Website.
Now whenever I am trying share any Post from Case Studies in LinkedIn it showing me preview as small thumb image along with Title in side by side but when I share Blog Post or Page in LinkedIn it shows me full width Image and Title in Below so I can add support to show Image as full width preview for all social media platforms.
Here is my Case Study code in functions.php
/* Case Studies Section */
add_action( 'init', 'cptui_register_my_cpts_case_studies' );
function cptui_register_my_cpts_case_studies() {
$labels = array(
"name" => "Case Studies",
"singular_name" => "Case Study",
);
$args = array(
"labels" => $labels,
"description" => "Create Case Studies Here",
"public" => true,
"show_ui" => true,
"show_in_rest" => false,
"has_archive" => false,
"show_in_menu" => true,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => false,
"query_var" => true,
"menu_position" => 5,
"supports" => array( "title", "editor", "excerpt", "custom-fields", "thumbnail" ),
"taxonomies" => array( "division", "cstags" ),
);
register_post_type( "case_studies", $args );
}
add_action( 'init', 'cptui_register_my_taxes_division' );
function cptui_register_my_taxes_division() {
$labels = array(
"name" => "Division",
"label" => "Division",
);
$args = array(
"labels" => $labels,
"hierarchical" => true,
"label" => "Division",
"show_ui" => true,
"query_var" => true,
"rewrite" => array( 'slug' => 'case-studies', 'with_front' => true ),
"show_admin_column" => false,
);
register_taxonomy( "division", array( "case_studies" ), $args );
}
add_action( 'init', 'cptui_register_my_taxes_cstags' );
function cptui_register_my_taxes_cstags() {
$labels = array(
"name" => "CSTags",
"label" => "CSTags",
);
$args = array(
"labels" => $labels,
"hierarchical" => true,
"public" => true,
"publicly_queryable" => true,
"label" => "CSTags",
"show_ui" => true,
"query_var" => true,
"hierarchical" => false,
'rewrite' => array('slug' => '', 'with_front' => false ),
"show_admin_column" => false,
);
register_taxonomy( "cstags", array( "case_studies" ), $args );
}
I had allready added add_theme_support('post-thumbnails'); in my functions.php for theme support so why Case Study - Custom Post type is not showing full width preview and page/blog posts are showing.
for reference you can check following URLs.
Any help is most appreciated.
Thank you.