add Solidworks sldrpt part on WordPress

How to add Solidworks sldrpt part on WordPress? (solution)


Share SolidWorks sldprt part on WordPress

If you want to create a website or blog where you would like to share SolidWorks parts that you design or taken from another website with consentment all of that using WordPress but you have not been able to do it and also not finding the right plugin on how to do it.

 

Follow the next step so you can be able to add Solidworks sldrpt part on WordPress. It is going to be a one-time process and after you can add all Solidworks parts the same way you add pictures.

 

 Step 1:

Make sure you are in the WordPress dashboard of your website.

 

wordpress dashboard

Step 2:

Go to  Appearance on the right of your WordPress dashboard and click Theme File Editor like the following:

 

wordpress dashboard solidworks

Step 3:

What you have to do is to copy and paste the following code to function.php of the Theme File Editor that you have just opened and  delete <?php

 

slprt

 

/**
* Add support for SOLIDWORKS (.sldprt) file type to be uploaded in Media Library
* Add to functions.php
*/
function solidworks_mime_types($mime_types){
$mime_types[‘sldprt’] = ‘application/octet-stream’; //Adding svg extension
return $mime_types;
}
add_filter(‘upload_mimes’, ‘solidworks_mime_types’, 1, 1);

 

Screenshot 292

Step 4 :

Do not forget to update and enjoy

 


Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top