Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Theme PHP File Include Issue
#6
(2015-09-09, 04:15:51)shawn_a Wrote: what version of GS.....

I should reword that....

I cannot use the get_theme_url() in the php file that I am trying to use.


Code:
$folder = 'assets/images/projects/';
$filetype = '*.*';
$images = glob($folder.$filetype);

$j = 0;

$column1 = array();
$column2 = array();
$column3 = array();

foreach($images as $i){
   //echo "<img id='imagesLine' onmouseover='changeImage(\"".$i."\")' src='".$i."' />";
   switch ($j) {
       case 0:
           $column1[] = $i;
           $j = $j+1;//set for next
           break;
       case 1:
           $column2[] = $i;
           $j = $j+1;//set for next
           break;
       case 2:
           $column3[] = $i;
           $j = 0;//set for next
           break;
   }
   
}

   foreach($column1 as $i) {
       echo $i . "<br />";
   }

   echo "<div class='imageContainer'>";
   echo "<div class='col-3'>";
   foreach($column1 as $i){
       echo "<img class='project' src='http://localhost/WebDesignerWebsiteCMS/theme/Innovation/". $i."' />";
   }
   echo "</div>";
   echo "<div class='col-3'>";
   foreach($column2 as $i){
       echo "<img class='project' src='".$i."' />";
   }
   echo "</div>";
   echo "<div class='col-3 last'>";
   foreach($column3 as $i){
       echo "<img class='project' src='".$i."' />";
   }
   echo "</div>";
   echo "</div>";

The above is what I am trying to use, and the place where I'd like to use the function get_theme_url() is...


Code:
$folder = get_theme_url . 'assets/images/projects/';
Reply


Messages In This Thread
RE: Custom Theme PHP File Include Issue - by korey.badgley - 2015-09-09, 04:46:24



Users browsing this thread: 1 Guest(s)