juliocavalcanti

Carregamento de página mobile

Aug 7th, 2012 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. if(is_single() || is_page()) {
  2.       if (have_posts()) {
  3.         while (have_posts()) {
  4.           the_post();
  5.           print '<div class="post" id="post-' . get_the_ID() . '">'. PHP_EOL;
  6.             print '<h2>' . get_the_title() . '</h2>'. PHP_EOL;
  7.             ?>
  8.  
  9.             <script type="text/javascript">
  10.               $(document).ready(function($) {
  11.                 $(".commentform-<?php echo get_the_ID(); ?>").each(function(){
  12.                   commentForm = $(this);
  13.                   commentForm.validate();
  14.                   $("div.ui-submit",this).click(function(){
  15.                     commentForm.submit();
  16.                   });
  17.                 });
  18.               });
  19.             </script>
  20.            <?
  21.             wpmp_theme_post_single();
  22.         }
  23.       }
  24.  
  25.     } else {
  26.       query_posts("cat=3");
  27.       if (have_posts()) {
  28.         print '<ul data-role="listview" data-filter="true" data-inset="true" data-filter-placeholder="Filtrar...">';
  29.         while (have_posts()) {
  30.           the_post();
  31.           print '<li><a href="'; the_permalink(); print '" rel="bookmark" title="' . __('Link to', 'wpmp') . ' ' . get_the_title() . '">';
  32.           //print wpmp_theme_post_summary();
  33.           print '<p class="metadata">'. get_the_time('d-m-Y') . '</p>';
  34.           print get_the_title();
  35.           print '</a></li>';
  36.         }
  37.         print '</ul>';
  38.       }
  39.     }
Advertisement
Add Comment
Please, Sign In to add comment