Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $my_query = new WP_Query('posts_per_page=1000&orderby=date&order=ASC&cat='.$catymeta);
- while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate = $post->ID; ?>
- <?php ob_start(); the_title(); $showtitle = ob_get_clean(); (preg_match('#\bSeason (\d+)#', $showtitle, $matches)); ?>
- <?php // this set's the amount of season ?>
- <?php endwhile; ?>
- <?php
- $seasonAm = $matches[0];
- //echo $seasonAm;
- (preg_match('#\b (\d+)#', $seasonAm, $matches2));
- //echo $matches2[0];
- ?>
- <div id="seasons">
- <?php for ($i = 1; $i <= $matches2[0]; $i++) { ?>
- <a href="#season<?php echo $i ?>">Season <?php echo $i ?></a>
- <?php } ?>
- </div>
- <?php //echo "" . $matches[0] . "\n"; ?>
- <?php for ($i = 1; $i <= $matches2[0]; $i++) { ?>
- <a name="season<?php echo $i ?>" id="season<?php echo $i ?>"></a>
- <p><strong>Season <?php echo $i ?></strong></p>
- <ol>
- <?php $my_query = new WP_Query( "posts_per_page=1000&orderby=date&order=ASC&cat=".$catymeta );
- if ( $my_query->have_posts() ) {
- while ( $my_query->have_posts() ) {
- $my_query->the_post();
- {
- ?>
- <?php ob_start(); the_title(); $showtitle = ob_get_clean(); if (strpos($showtitle,'Season '.$i.' ') !== false) { ?>
- <li class="msg_head"><span><?php
- if (strlen($showtitle) > 70) {
- $text = substr($showtitle,0,70);
- echo $text."..."; } else { echo $showtitle; } ?> </span><div class="dwnArr"></div> <a class="show-play2" href="<?php the_permalink(); ?>">watch now</a></li>
- <div class="msg_body">
- <table border="0" cellpadding="0" class="episode-descrip">
- <tr>
- <td valign="center">
- <div class="swdescrip">
- <h5><?php echo $showtitle; ?></h5>
- <?php ob_start(); the_content(); $showcontent = ob_get_clean();
- if (strlen($showcontent) > 200) {
- $text2 = substr($showcontent,0,200);
- echo $text2."..."; } else if (strlen($showcontent) < 0) { echo "<div style=\"margin:15px 0;float:left\">No description available.</div>"; }
- else { echo $showcontent; }
- ?> <?php if ( current_user_can('level_10') ) { ?><br /><br /><a href="http://watchberry.com/wp-admin/post.php?post=<?php the_ID(); ?>&action=edit" target="_blank">-- edit</a><?php } ?></div>
- <a class="watchEpisode" href="<?php the_permalink(); ?>">Watch this Episode</a>
- </td>
- </tr>
- </table>
- </div>
- <?php } ?>
- <?php
- }
- }
- }
- wp_reset_postdata(); ?>
- </ol>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement