It would possible to use the standard featured image wordpress component for the projects, instead to having to paste the image url in the Project Images field?
Hi Hellover !
If you want to use the standard featured image wordpress component for the projects, you can do as the following:
1. Open the shortcodes.php file in the folder path “\wp-content\themes\dw-page-modern\inc”
2. Please find the line 359 to line 362.
Replace the following code:
$thumbnail = get_post_meta($project_id, '_project_thumbnail_'.$size, true);
if( !$thumbnail ){
$thumbnail = get_post_meta($project_id, '_project_thumbnail_small', true);
}
With new code:
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $project_id ), 'thumbnail' );
Hope this helps !
It’s ok to call the post_thumbnail instead of the project_thumbnail_small
But the wordpress feature image module in the admin is disable for projects post type, where can I enable it?
Hi,
Please open the project.php file in the folder path “\wp-content\themes\dw-page-modern\inc”. Find the line 38
Replace the following code:
‘supports’ => array( ‘title’, ‘editor’)
With line code:
‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’ )
Regards,
Please login or Register to submit your answer