hellover
asked 9 years ago

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?

1 Answers
DominicStaff
answered 9 years ago

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 !

hellover
replied 9 years ago

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?

Dominic Staff
replied 9 years ago

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,

Powered by DW Question & Answer Pro