WordPress.org

Forums

Inserting Live Video into Theme Header (3 posts)

  1. _anomaly
    Member
    Posted 2 years ago #

    My father is trying to insert live video into his website header and I have agreed to help him do this. Unfortunately, I do not know where to begin... guessing the header.php file would be the likely point of code insertion.

    Here is the website: http://www.angelscallministries.org/

    The theme of the website is from here: http://themeforest.net/item/wpchurch-powerful-theme-for-churches/201711

    As you can see, he has clearly butchered the feel of the original theme. The logo that was supposed to be small and in the top left hand corner of the page has been replaced with a ridiculously large logo. User ability is crap. Now he wants to insert live video between the two angels.

    We talked about putting the live video in the slideshow area below the menu instead. The slideshow would play as it normally would on any other site, but when my father is doing a live video on Ustream, then the slideshow would be replaced with the live video stream.

    Here is the PHP script for the header:

    <?php
    /**
     * The Header for our theme.
     *
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <title><?php wp_title(); ?></title>
    <meta name="description" content="<?php the_meta_description(); ?>">
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link class="schanger" rel="stylesheet" class="changer" href="<?php echo get_template_directory_uri(); ?>/styles/<?php echo get_option('nets_colorscheme'); ?>.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.css" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
    if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
    wp_enqueue_script( 'jquery' );
    wp_head();
    ?>
    <script src="<?php echo get_template_directory_uri(); ?>/js/audio-player.js" type="text/javascript"></script>
    	<script type="text/javascript">
    		AudioPlayer.setup("<?php echo get_template_directory_uri(); ?>/js/player.swf",
    		{
            	width: 600,
           		transparentpagebg: "yes",
            	autostart: "yes",
            	leftbg: "DCDACF",
            	rightbg: "DCDACF",
            	voltrack: "F2EEE3",
            	lefticon: "<?php get_playercolor(); ?>",
            	volslider: "<?php get_playercolor(); ?>",
            	righticon: "<?php get_playercolor(); ?>",
            	loader: "<?php get_playercolor(); ?>",
            	tracker: "DCDACF",
            	track: "F2F0E4",
            	bg: "F2F0E4"
     		});
    	</script>
    
    <?php
    $thevfont = str_replace(' ','+', get_option('nets_vfont'));
    ?>
    <?php if (!get_option('nets_fontcode')) { ?>
    <link href="http://fonts.googleapis.com/css?family=<?php echo $thevfont; ?>&v2" rel="stylesheet" type="text/css">
    <?php } else { echo stripslashes(get_option('nets_fontcode')); }
    if (!get_option('nets_fontcode')) {
    $familycode = get_option('nets_vfont');
    } else { $familycode = get_option('nets_fontfamily'); }
    ?>
    
    <style>
    .nextdesc, .lasthead, .caldr h3{font: 20px/27px '<?php echo $familycode; ?>', Arial, sans-serif;}
    .entry-title {font: 30px/60px '<?php echo $familycode; ?>', Arial, sans-serif;}
    .mainwelcome h1, .daydisplay h1{font: 36px/40px '<?php echo $familycode; ?>', Arial, sans-serif;}
    h6.day {font: 50px/40px '<?php echo $familycode; ?>', Arial, sans-serif;}
    .widget-title, #content .calmonth h1, .saboutpage h3, .aboutpage h3	{font: 24px/47px '<?php echo $familycode; ?>', Arial, sans-serif;}
    .sider .widget-title{font: 19px/22px '<?php echo $familycode; ?>', Arial, sans-serif;font-family: '<?php echo $familycode; ?>', Arial, sans-serif;}
    .daydisplayw h1, h6.month, h3#reply-title, h3#comments-title {font: 22px/20px '<?php echo $familycode; ?>', Arial, sans-serif;}
    blockquote, #content .entry-content h1, #content .entry-content h2, #content .entry-content h3, #content .entry-content h4, #content .entry-content h5, #content .entry-content h6{font-family: '<?php echo $familycode; ?>', Georgia,Arial, sans-serif;}
    .shortcalentry a, #content .finfo h4{font: 22px/20px '<?php echo $familycode; ?>', Arial, sans-serif;}
    .dirr a{font: 18px/49px '<?php echo $familycode; ?>', Arial, sans-serif;}
    #content .calexplain p {font: 18px/24px '<?php echo $familycode; ?>', Arial, sans-serif;}
    
    </style>
    
    <!--[if IE 7.0]>
    <style>
    .micfront, .movfront {float: right; margin: -30px 20px 0 20px;cursor: pointer; }
    .fppostli a.postera	{height: 65px; line-height: 22px; overflow: hidden;display:block;text-decoration:none;margin-top: -20px;}
    </style>
     <![endif]-->
    </head>
    
    <body <?php body_class(); ?> >
    
    <div id="topbg">
    	<div id="access" class="container" role="navigation">
    		<?php if (get_option('nets_themelogo') && get_option('nets_themelogo') != 'no image uploaded') { ?>
    		<a href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img class="logoimg" src="<?php echo get_option('nets_themelogo'); ?>"></a>
    		<?php } else { ?>
    		<a href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img class="logoimg" src="<?php echo get_template_directory_uri(); ?>/styles/<?php echo get_option('nets_colorscheme'); ?>/logo.png"></a>
    		<?php } ?>
    		<?php if (get_option('nets_countdown')  != 'true') { ?>
    		<div class="eventd">
    			<div class="nextdesc"><?php echo get_option('nets_sptnextev')?></div>
    			<?php get_for_timer(); ?>
    		</div>
    		<?php } ?>
    		<div class="clear"></div>
    		<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'wp-church' ); ?>"><?php _e( 'Skip to content', 'wp-church' ); ?></a></div>
    		<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    		<div class="clear"></div>
    	</div>
    </div>

    Now here is what I believe the slideshow banner php script is:

    <?php
    /**
     * The loop that displays posts.
     *
     */
    
    ?>
    
    <?php /* If there are no posts to display */ ?>
    <?php if ( ! have_posts() ) : ?>
    	<div id="post-0" class="post error404 not-found">
    		<h1 class="entry-title"><?php _e( 'Not Found', 'wp-church' ); ?></h1>
    		<div class="entry-content">
    			<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'wp-church' ); ?></p>
    			<?php get_search_form(); ?>
    		</div><!-- .entry-content -->
    	</div><!-- #post-0 -->
    <?php endif; ?>
    
    <?php
    	/* Start the Loop.
    	 *
    	 *
    	 * Without further ado, the loop:
    	 */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    		<div class="c_entry">
    
    			<?php the_post_thumbnail('full'); ?>  
    
    			<div class="c_entry-meta">
    
    				<div class="ctime">
                		<h6 class="day"><?php the_time('j') ?></h6>
                		<h6 class="month"><?php the_time('M') ?><br><?php the_time('Y') ?></h6>
                		<div class="clear"></div>
    				</div>
    				<p>Posted by<br/><strong><?php the_author(); ?></strong></p>
    				<p>Posted in<br/><?php the_category('<br/>'); ?></p>
    				<?php comments_popup_link( __( 'Leave a comment', 'wp-church' ), __( '1 Comment', 'wp-church' ), __( '% Comments', 'wp-church' ) ); ?>
    
    			</div><!-- .entry-meta -->
    			<div class="c_entry-content">
    				<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wp-church' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<?php the_excerpt(); ?>
    			</div>
    			<div class="clear"></div>
    
    		</div>
    
    	<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
    			<div class="entry-summary">
    
    			</div><!-- .entry-summary -->
    	<?php else : ?>
    			<div class="entry-content">
    				<?php the_content( __( '<span>Read More</span>', 'wp-church' ) ); ?>
    				<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'wp-church' ), 'after' => '</div>' ) ); ?>
    			</div><!-- .entry-content -->
    	<?php endif; ?>
    
    			<div class="entry-utility">
    				<?php
    					$tags_list = get_the_tag_list( '', ' ' );
    					if ( $tags_list ):
    				?>
    					<span class="tag-links">
    						<?php printf( __( '<span class="%1$s">Tags:</span> %2$s', 'wp-church' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    					</span>
    				<?php endif; ?>
    			</div><!-- .entry-utility -->
    
    		</div><!-- #post-## -->
    
    		<?php comments_template( '', true ); ?>
    
    <?php endwhile; ?>
  2. _anomaly
    Member
    Posted 2 years ago #

    Oh yeah, I forgot to ask the question...

    Can someone tell me what I have to insert the video?

  3. Japh
    Member
    Posted 2 years ago #

    Hi _anomaly, it might be worth contacting the author of the theme directly for help on modifying it, as it can be difficult for others to help change a commercial theme when they don't have access to the code.

    You can contact the author for this particular theme here: http://themeforest.net/user/Net-Labs using the contact form on their profile page.

    Hope it goes well for you and your Dad! :)

Topic Closed

This topic has been closed to new replies.

About this Topic