StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Can Video & Image Option Coexist without Toggling? (http://www.studiopress.com/support/showthread.php?t=15170)

richardantondiaz 10-09-2009 12:14 PM

Can Video & Image Option Coexist without Toggling?
 
The way in which the Demo shows with Homepage holding a Video Homepage as a link?

adew 10-10-2009 04:31 AM

Re: Can Video & Image Option Coexist without Toggling?
 
The short answer is no. However, it is possible to modify page_video.php so that you can use it as a more traditional page template for displaying videos.

Find this code in page_video.php:
Code:

<div class="hpmain">
       
        <div class="hpmainleft">
                        <?php $recent = new WP_Query('page_id='.get_theme_mod('hp_main')); while($recent->have_posts()) : $recent->the_post();?>
            <h2><?php the_title(); ?></h2>
                        <?php the_content_limit(600, ""); ?>
           

<?php _e("Read more", 'studiopress'); ?></p>         
                        <?php endwhile; ?>
        </div>
           
        <div class="hpmainright">
                        <?php // start code which figures out whether to show image or video ?>
                        <?php if(get_theme_mod('video') == 'Yes') { ?>
                          <?php echo get_custom_field('_video_code'); ?>
            <?php } else { ?>
                [img]<?php bloginfo('template_url'); ?>/images/sample.jpg[/img]" />
            <?php } ?> 
            <?php // end code ?>
        </div>
                               
        </div>

and replace it with this:
Code:

<div class="hpmain">
       
        <div class="hpmainleft">
                        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <h2><?php the_title(); ?></h2>
                        <?php the_content_limit(600, ""); ?>
           

<?php _e("Read more", 'studiopress'); ?></p>         
                       
        </div>
           
        <div class="hpmainright">
                        <?php // get video code ?>
                        <?php get_custom_field('_video_code'); ?>
           
                        <?php endwhile; endif; ?>
                </div>
                               
        </div>


olaoluwa 10-14-2009 06:55 PM

Re: Can Video & Image Option Coexist without Toggling?
 
Thanks for the hack. However, this still leaves the lower section, below the video (where you have the Company News as in http://www.studiopress.com/demo/executive.html) unchanged.

How do you change the images to videos? I am aware of the Theme Options, but when you modify the Homepage, it replicates with the Video Page as well.

I just want to replicate the Main Homepage (with images) and Video Homepage (with videos) as in demo:
http://www.studiopress.com/demo/executive.html


All times are GMT -5. The time now is 10:49 PM.

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