Jump to content

Wordpress video thumbnail Question


renfley

Recommended Posts

ok so im trying to figure out how to put a thumbnail on the front page and once the thumbnails is clicked would then send the user to another page to watch the video. Sounds simple i know but i have been struggling for like two days on this issue.

 

Here is the website, Or testing grounds. Ive taken an existing template and completly revamped it and i have a few things left to bugger out in the template file but this is definatly the worse.

 

http://www.liquidscripts.com

 

The first post you see is a thumbnail which then bring you to the singlepost.php and only diplay the image if you click the image it shows just the image i would like that once the thumbnail is clicked only to display the embeded video.

 

here is the function php

<?php
if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '<h1>',
        'after_title' => '</h1>',
    ));

    // Enable support for post-thumbnails  
      
    add_theme_support('post-thumbnails');  
      
    // If we want to ensure that we only call this function if  
    // the user is working with WP 2.9 or higher,  
    // let's instead make sure that the function exists first  
      
    if ( function_exists('add_theme_support') ) { 
        add_theme_support('post-thumbnails');  
    }  

?>

 

Here is the single post.php

<?php get_header(); ?>
<?php get_sidebar(); ?>

		<div id="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>

<?php the_content('Read the rest of this entry »'); ?>

<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

<?php the_tags('<p>Tags: ', ', ', '</p>'); ?>

			<p class="post-footer align-right">					
				<span class="readmore"><?php the_category(', ') ?></span>
				<a href="<?php comments_link(); ?>" class="comments">Comments <?php comments_number('0','1','%'); ?></a>
				<span class="date"><?php the_time('M jS, Y') ?><!-- by <?php the_author() ?> --></span>	
			</p>

<?php comments_template(); ?>
<?php endwhile; else : ?>

	<h1>Not Found</h1>
	<p>Sorry, but you are looking for something that isn't here.</p>

<?php endif; ?>
		</div>

<?php get_footer(); ?>

 

and here is the main index template.php

<?php get_header(); ?>
<?php get_sidebar(); ?>

		<div id="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>

<?php the_content('Read the rest of this entry »'); ?>

<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

<?php the_tags('<p>Tags: ', ', ', '</p>'); ?>

			<p class="post-footer align-right">					
				<span class="readmore"><?php the_category(', ') ?></span>
				<a href="<?php comments_link(); ?>" class="comments">Comments <?php comments_number('0','1','%'); ?></a>
				<span class="date"><?php the_time('M jS, Y') ?><!-- by <?php the_author() ?> --></span>	
			</p>

<?php comments_template(); ?>
<?php endwhile; else : ?>

	<h1>Not Found</h1>
	<p>Sorry, but you are looking for something that isn't here.</p>

<?php endif; ?>
		</div>

<?php get_footer(); ?>

 

Guys i would really appreciated some input here.

Link to comment
https://forums.phpfreaks.com/topic/249085-wordpress-video-thumbnail-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.