Hello,
We have a Wordpress.org website which has a custom page display implemented for the following page:
http://www.dermhairclinic.com/category/patient-videos/
In short, the page itself contains a series of excerpts from articles entered into the video category, has also been customized to display:
a) brief intro about each article in the video category
b) preview aka screenshot of the video within each article
c) if you click the screenshot of the video itself, it actually launches the video in a popup window
To see how it is supposed to work… you can click on page two of the patient videos category, and if you navigate down to the following link, it along with everything after it work flawlessly:
Beautiful Eyebrow Transplant with 350 FUE Grafts
MARCH 28, 2013
One day it just stopped working. It appears to be a referencing issue but I cannot locate the source of the problem. We have double checked the URLs which were used to insert the videos, nothing there. We have checked the videos themselves and they work fine. Oddly enough (or I suppose not) this problem reared its ugly head on our sister site, which has (you guessed it) the same identical code.
http://www.finetouchdermatology.com/category/patient-videos/all-videos/
I have spent so many hours trying to resolve this one - its unreal. Never was much of a PHP wiz. I would immensely appreciate any suggestions offered.
Here is the code used to generate that Wordpress page:
[php]<?php get_header(); ?>
<?php foreach((get_the_category()) as $category) { $the_category = $category->cat_name . ' '; } ?><?php echo wp_title($sep,$echo,$seplocation );?>
if (is_category()) {
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "") {
$children = wp_list_categories('show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);
}
}
if ($children) { ?>
<ul>
<?php echo $children; ?>
</ul>
<?php } ?>
</div>
<?php if(function_exists('wp_paginate')) {
wp_paginate();
} ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post">
<div class="indent bgnone">
<div class="title">
<a href="<?php the_permalink() ?>" rel="bookmark"><h2><?php the_title(); ?></h2></a>
<div class="date">
<?php the_time('F j, Y'); ?>
</div>
</div>
<div class="text-box">
<?php
if ($video = get_post_meta($post->ID, 'patient-video', true)) {
$videoimg = substr($video, 25);
?>
<div id="videobox">
<div class="videogalldiv" style="width: 160px;">
<a href="<?php echo $video; ?>&hl=en&" rel="shadowbox;width=640;height=480"><img width="150" src="http://img.youtube.com/vi/<?php echo $videoimg; ?>/default.jpg"></a>
</div>
</div>
<?php
}
?>
<?php the_excerpt(); ?><a href="<?php the_permalink() ?>" rel="bookmark">Read more >></a> <div class="clear"></div>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<div class="postmeta">
</div>
</div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.', 'bww'); ?></p><?php endif; ?>
<!--add comments-->
</div>
<!-- close post-->
<?php get_footer(); ?>[/php]