2 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
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!

1531 posts
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 3-4 years
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
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
gattung says

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

1531 posts
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 3-4 years
webdesignerart says

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

63 posts
  • Exclusive Author
  • Has been a member for 1-2 years
  • Envato Studio (Microlancer) Beta Tester
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
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