Display custom post type in Grid using shortcode
'portfolio',
'posts_per_page' => '999',
'publish_status' => 'published',
'tax_query' => array(
array(
'taxonomy' => 'project-type',
'terms' => 'summit2020',
'field' => 'slug',
),
),
);
$query = new WP_Query($args);
?>
CSS for Grid
/* custom code for grid start here */
.cust-img-all-ambassadors img{
object-fit: cover;
height:280px!important;
border-radius:5px;
}
@media (min-width:767px){
.grid-container {
display: grid!important;
grid-template-columns: auto auto auto auto;
padding: 10px;
}
.grid-item {
padding: 20px;
}
}
@media (max-width:767px){
.grid-container {
display: grid!important;
grid-template-columns: auto;
padding: 10px;
}
.grid-item {
padding: 10px;
}
}
/* custom code for grid end here */
/* custom code for grid start here */
.cust-img-all-ambassadors img{
object-fit: cover;
height:280px!important;
border-radius:5px;
}
@media (min-width:767px){
.grid-container {
display: grid!important;
grid-template-columns: auto auto auto auto;
padding: 10px;
}
.grid-item {
padding: 20px;
}
}
@media (max-width:767px){
.grid-container {
display: grid!important;
grid-template-columns: auto;
padding: 10px;
}
.grid-item {
padding: 10px;
}
}
/* custom code for grid end here */