PHP WordPress Template During Testing


<?php
/*
Template Name: Web App
*/
get_header();?>

<link href="/wp-content/themes/twentyfourteen-child/webapp-style.css" type="text/css" rel="stylesheet" />
<link href="/wp-content/themes/twentyfourteen-child/fluid.css" rel="stylesheet" type="text/css" />
<script src="/wp-content/themes/twentyfourteen-child/respond.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" />
<style type="text/css">/*<![CDATA[*/  a.c1 {display: inline;}  /*]]>*/ </style>


<br />
  <div class="gridContainer clearfix statusText" style="margin-top:60px; margin-bottom:280px;">
    <div class="fluid left">
      <div class="fluid one centerIcon greenBackground">1</div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/app.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/video.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/cards.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/quiz.png" alt="" /></div>
      
      <br />
<?php
$args = array( 'post_type' => 'Classes', 'orderby' => 'title', 'order' => 'asc' );
$loop = new WP_Query( $args );
$current_user = wp_get_current_user();
$completeApp = get_user_meta( $current_user->ID, 'app', true );
$completeVideo = get_user_meta( $current_user->ID, 'video', true );
$completeCards = get_user_meta( $current_user->ID, 'cards', true );
$completeQuiz = get_user_meta( $current_user->ID, 'quiz', true );
while ( $loop->have_posts() ) : $loop->the_post();
	echo '<div class="fluid one centerIcon greyBackground">', the_title(),  '</div>';
	if ( in_array( get_the_ID(), $completeApp ) ) {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=app"><img src="/wp-content/themes/twentyfourteen-child/check.png" alt="" /></a></div>';
	} else {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=app"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></a></div>';
	};
	if ( in_array( get_the_ID(), $completeVideo ) ) {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=video"><img src="/wp-content/themes/twentyfourteen-child/check.png" alt="" /></a></div>';
	} else {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=video"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></a></div>';
	};
	if ( in_array( get_the_ID(), $completeCards ) ) {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=cards"><img src="/wp-content/themes/twentyfourteen-child/check.png" alt="" /></a></div>';
	} else {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=cards"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></a></div>';
	};
	if ( in_array( get_the_ID(), $completeQuiz ) ) {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=quiz"><img src="/wp-content/themes/twentyfourteen-child/check.png" alt="" /></a></div><br />';
	} else {
	    echo '<div class="fluid five centerIcon"><a href="' , get_permalink(), '?classtype=quiz"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></a></div><br />';
	};
endwhile;
?>

</div>

<div class="fluid right">
      <div class="fluid one centerIcon">.</div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/app.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/video.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/cards.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/quiz.png" alt="" /></div><br />
      <br />

      <div class="fluid one centerIcon blueBackground">
        1
      </div>

      <div class="fluid five centerIcon"><div class="percent">0%</div></div>

      <div class="fluid five centerIcon"><div class="percent">50%</div></div>

      <div class="fluid five centerIcon"><div class="percent">75%</div></div>

      <div class="fluid five centerIcon"><div class="percent">95%</div></div>
      
      <br />
      <br />

      <div class="fluid one centerIcon greenBackground">2</div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>
      
      <br />
      <br />

      <div class="fluid one centerIcon orangeBackground">3</div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>

      <div class="fluid five centerIcon"><img src="/wp-content/themes/twentyfourteen-child/play.png" alt="" /></div>
    </div>
</div>
  
 

<?php 

echo '--------------------------------------------<br />';
$args2 = array('child_of' => 10);
$categories = get_categories( $args2 );
foreach($categories as $category) { 
    $amtPosts = 0;
    $idPosts = Array();
    
    $args3 = array( 'post_type' => 'Classes', 'orderby' => 'title', 'order' => 'asc', 'cat' => $category->term_id );
    $loop2 = new WP_Query( $args3 );
    
    while ( $loop2->have_posts() ) : $loop2->the_post();
	    //echo '<div>', the_title(),  '</div>';
	    array_push($idPosts, get_the_ID());
	    $amtPosts++;
    endwhile;
    
    echo '<p> in Level'. $category->description . '<br />';
    echo 'ther are Total Posts: '. $amtPosts;
    echo '<br />';
    echo 'the post are '.var_dump($idPosts).'<br /><br />';
    
    foreach ($idPosts as $IDP){
        echo 'the post '.$IDP.'<br />';
        echo 'app is set to '. get_post_meta($IDP,'app', true) .'<br />';
    }
    echo var_dump($completeApp).'<br />';
    echo var_dump($completeVideo).'<br />';
    echo var_dump($completeCards).'<br />';
    echo var_dump($completeQuiz).'<br />';
}

get_footer(); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>