2 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
gattung says

Most of the themes I am trying require inserting each image link into the html of the portfolio page. Does anyone know of a theme that includes an auto load from folder script so if I need to load a lot of images I don’t have to write a link to each one?

Thanks!

1554 posts
  • Has been part of the Envato Community for over 3 years
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
webdesignerart says

Not so clear, First you have wordpress theme? Second see if you saying that there is folder of images and you want everytime you update images on that folder then website automatic load images from that folder then it will need a programmatic customization or custom php script that will get all files from folder and render it into your website.

2 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
gattung says

Thanks, this is a non-wp site. I was able to insert PHP code to do the job.

1554 posts
  • Has been part of the Envato Community for over 3 years
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
webdesignerart says

Then it will be a php based custom coding require to achive your goal.

63 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
PrimeThemes says
//define ABSPATH as main dir, clone from WP function
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

//let say. your images folder is under the main dir named "images" - http://yoursite.com/images/
$img_path = ABSPATH . '/images/';
//see glob() function in php.net website to get more info
$files = glob($img_path . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}');

if( is_array( $files ) ){
//do data process
    foreach ( $files as $f ) {
    $file_info = pathinfo( $f );
    $file_name = $file_info['filename']; //get filename without extension
    $extension = '.'. $file_info['extension'];

       echo 'http://yoursite.com/images/' . $file_name . $extension;
    }
}

just basic example, hope this help :)

good luck!

by
by
by
by
by
by