Jump to content

Bald_and_Anrgy

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Bald_and_Anrgy

  1. Great! Thanks guys. Really appreciate the advice and help
  2. Thanks so much Charlie. 1. I sat up playing with the code last night, and exchanging get_bloginfo('template_url') for the Wordpress constant TEMPLATEPATH fixed the issue, and the gallery is now loading 2. I had no idea that was the wrong way to do that loop, but I'm now updating it thanks to your advice 3. That's a great suggestion. I was only just getting caught up on the fact that the array was empty and not really checking where it was going wrong. Thanks. Could you suggest any resources that are handy in learning PHP, as opposed to just pulling apart Wordpress? It seems like a pretty powerful tool to have in your toolbox
  3. Would love to help, but the page isn't found
  4. Wow, am I glad I found you guys. The CSS forums I normally frequent are a little weak in PHP, so I hope someone might be able to help. PHP is something I've recently started playing with, but have been coding websites for a while. Ok, so the issue is that I managed to write a PHP script in a static site to load images from a directory, and load them into a list which has been styled with CSS. The script works perfectly. The key to the load is the path of the directory, which I pass in as a variable... $tempDir = "/images/" The problem arises when I try to change the value of the variable to a Wordpress shortcode combined with a relative path. I've included the code here: $tempDir = get_bloginfo('template_url') . '/img/gallery/generic/'; //$tempDir = '/img/gallery/generic/'; works on the static site $myDirectory = opendir($tempDir); while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } closedir($myDirectory); $indexCount = count($dirArray); echo $indexCount; The echo at the end is just so I can see whether the array is populating... which it's not. There is another piece of code to do the load, but that seems to be fine. Is someone able to help?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.