Necesita un complemento de galería de videos de wordpress que funcione como

I have a client that i have completed a design from scratch and wordpress theme, the project is an internet TV website, although im falling short on finding a Decent video gallery plugin that meets basic needs, I designed the site and after researching found mpora, which had the exact method i was trying to accomplish, can someone point me in the direction of a plugin or a method of theming that works the same...

It would be superb if i could embed a video into a normal post that can be categorized and he can add additional information like a normal blog post and on the homepage have the thumbnail displayed in a gallery, when clicked takes to the full post. plus be able to have all other blog posts under a /blog


preguntado el 30 de agosto de 11 a las 22:08

Esta pregunta está fuera de tema para StackOverflow. Dedique unos minutos a leer el Preguntas Frecuentes for what questions are appropriate for this site. A general rule is that if it's not a question directly related to writing your own application or library, or using a programming related tool or library, it's not on-topic here. Voting to migrate to Webmasters donde es más apropiado. Gracias. :) -

I never knew that website existed, Thanks. -

1 Respuestas

You know this isnt that hard to do...

in your functions.php file for your template simply add.

add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' ));

this will enable you to create a single-{CATID-NUMBER}.php file, ie


5 is the category called 'VIDEO', which has an ID of 5, but make sure you change this to match your install...

within this singles page you can use custom fields, to pull your video embed code onto that page...

if ( get_post_meta($post->ID, 'VIDEOEMBEDCODE', true) ) : 
 echo get_post_meta($post->ID, 'VIDEOEMBEDCODE', true) 
 echo "No Video embed code...";

luego usando

add_theme_support( 'post-thumbnails' );

within your functions.php again, you can enable post thumbnails, simply use those and a custom wp_query on your home page to pull a list of videos from that category using the post thumbnails as the link?

  $temp = $wp_query;
  $wp_query= null;
  $wp_query = new WP_Query();
  while ($wp_query->have_posts()) : $wp_query->the_post();
<div class="videobox">
  <?php the_title();?>
  <?php if ( has_post_thumbnail() ) { ?>
     <img src="<?php the_post_thumbnail();?>"/>
  <?php }else{ ?>
     <img src="<?php bloginfo('template_url');?>/images/blank_video.jpg" />
  <?php } ?>
$wp_query = null; 
$wp_query = $temp;

with wordpress theres nearly always a way :)

!!!UPDATE !!! - To answer your comment below..

The single-5.php file is created inside your theme folder, then wordpress will interpret this file and shows this page only when a single post from the category 5 (Video) is being viewed, this is only so you can have a Video styled page, ie so it looks like este, and so you can style your regular posts differently from that of your video pages...

To achive this you add the first section of code to your functions file also in your theme folder. then to use the in-built post thumbnail, add the line

add_theme_support( 'post-thumbnails' );

to your functions file once again,

then while writing a post, or adding a new video, you would write a post as notmal,

  • Add the title(Video Title)
  • Add post content(video Description)
  • Add it to the Video Category(5)


On the right hand side under where you pick the category you should see a new panel, called FOTO PRINCIPAL, this is created by adding add_theme_support( 'post-thumbnails' ); to your functions file..

click on the "establecer imagen destacada" link,

Your media browser will appear, either upload an image to use as the thumbnail or use the "FROM URL" up top, and paste in the link to the thumbnail ie from Youtube, and in the image property details section, there will be a small link at the bottom, "USE AS FEATURED IMAGE", click this and that will add the image as the featured image...

then follow the rest of the info above :) using the has_post_thumbnail() within your template file to show the featured images...


Respondido el 07 de Septiembre de 11 a las 20:09

oh cool, cheers Marty, I don't understand the reason for the single-5.php category page though? or how its tied in? Also how do you define a post's thumbnail when creating a post!? - Dioses Muertos

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.