1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div id="main">
		
			<div class="frontpagetabs">
			
			<div class='entry'>
			<?php 
			
			#query the pags do display on the starting page
			if($k_option['mainpage']['mainpage_content_final'] != "")
			{
				$id_order = explode(',', $k_option['mainpage']['mainpage_content_final']);
				$args = array(
				  'post_type' => 'page',
				  'post__in' => $id_order
				  );

			
				$additional_loop = new WP_Query($args);
				
				#sorts the array so it reflects the order selceted in the backend
				foreach($additional_loop->posts as $the_post)
				{
					foreach($id_order as $key => $value)
					{
						if($value == $the_post->ID)
						{
							$tempArray[$key] = $the_post;
						}
					}
				}
				$additional_loop->posts = $tempArray;

				
				#output loop
				$counter = 1;
				$firstContainer = 'fpactive_tab_content';
				$firstTab = 'fpactive_tab';
				while ($additional_loop->have_posts()) : $additional_loop->the_post(); 
				?>
								
				<h1 class='fptab <?php echo $firstTab; ?>'><!--<a href="<?php the_permalink(); ?>"> --><?php the_title(); ?><!--</a>--></h1>
				<div class='fptab_content tab<?php echo $counter. " ".$firstContainer; ?>'>
				<?php the_content('Read more'); edit_post_link('Edit', '', '');?>
				</div>
				
				<?php  
				$firstContainer = $firstTab = "";
				$counter ++;
				endwhile; 
			}
			else
			{
				echo "<h1>Welcome and Thanks for installing Avisio!</h1>";
				echo "It seems you didnt set up your frontpage by now. You can do that in your wordpress backend at Avisio Options &raquo; <a href='".get_option('siteurl')."/wp-admin/options.php?page=mainpage.php' title=''>Mainpage Options</a>";
			}
			
			?>
			<!--end enty -->
			</div>
			<span class="hr"></span>			
			
			</div>
		
		<!--end main-->
		</div>