StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Featured Video Suggestion (http://www.studiopress.com/support/showthread.php?t=30619)

gordonmartin 06-13-2010 10:43 AM

Featured Video Suggestion
 
If I wanted to put a featured video at the top (in the place where you would normally place the dynamic featured content gallery at the top of the main page)

What way would I go about this?

I want to be able to put a featured video at the top of that page, but on a weekly basis I want to replace it with a fresh video, and have the other videos still in the blog archives, and also to shopw up as a recent post

What way would you suggest to do this?

Plugin?

Or editing home.php

If editing home.php what would I need to add in there?

Any Comments Appreciated

Warmest Regards,

Gordon

Debra 06-13-2010 11:04 AM

open home.php

find and remove the bold

<div id="homepage">

<?php // checks to see if the Featured Content Gallery plguin is enabled - if it isn't, nothing will diplay ?>
<?php if (function_exists('gallery_styles')) : ?>

<div id="homepagetop">
<div class="featuredtop">
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
</div>
</div>
<?php endif; ?>
<?php // end ?>


in it's stead put

PHP Code:

 
    <div id="homepage">
    
        
             <div id="homepagetop">
            <div class="featuredtop">
<?php $recent = new WP_Query("cat=14&showposts=1");  while($recent->have_posts()) :  $recent->the_post();?>
            <h1><?php the_title(); ?></h1>
          

            <?php the_content(__('Read more''studiopress'));?><div class="clear"></div>
           
                <?php endwhile; ?>


            </div>
        </div>

create a video category

Replacing 14 with your category number

then you only have to create a post and it will pull automatically.

gordonmartin 06-13-2010 11:19 AM

Thanks for your very comprehensive answer Debra, very much appreciated. At the moment, I have a dynamic featured Content Galley in there, at the moment, it pulls the images from the latest posts. From what I can see though, it is only for static images, would that be right, or could it be used for video also? I am thinking the way that you have described to me would be a better way to go?

Warmest Regards,

Gordon

Debra 06-13-2010 11:37 AM

I don't believe that DCG pulls video at this time. You could keep a back up of your current page code, try the option I gave you and if dissatisfied return to the old code.

adew 09-07-2010 02:07 PM

Raising an old thread from the dead.... :smile:

No, DCG doesn't handle video.


All times are GMT -5. The time now is 05:33 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.