Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How can I make a script run in just the h1? (banner)

    Hello,

    I was wondering if it is possible to run just a script in the h1 of my site. I found a snow script and I'd like for it to show up only ontop of my banner which is in my h1.

    Code:
    <?php 
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head profile="http://gmpg.org/xfn/1">
    	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    	
    	<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    	<style type="text/css" media="screen">
    		@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
    	</style>
    	
    	<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    	
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
        <?php wp_get_archives('type=monthly&format=link'); ?>
    	<?php //comments_popup_script(); // off by default ?>
    	<?php wp_head(); ?>
    </head>
    
    <body>
    <div align="center" id="container">
    <h1>Banner</h1>
    <div id="blogging">
    <div id="rap">
    
    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    
    <?php the_date('','<h2>','</h2>'); ?>
    	
    <div class="post">
    	 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    	
    	<div class="storycontent">
    		<?php the_content(); ?>
    	</div>
    	
    	<div class="feedback">
                <?php wp_link_pages(); ?>
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    	
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    </div>
    
    </div>
    
    <!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by <a href='http://wordpress.org' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?></cite>
    </div>
    </div>
    <script type="text/javascript" src="../snow.js">
    
    /***********************************************
    * Snow Effect without images-by Kurt Grigg at http://www.btinternet.com/~kurt.grigg/javascript
    * Script featured & available at Dynamic Drive at http://www.dynamicdrive.com/
    * Please keep this notice intact
    ***********************************************/
    
    </script>
    </body>
    </html>
    Right now I have the script at the bottom of the body, and it wouldn't show up when I put it in the <h1>.

    My css file is here: http://talesforums.com/wp-layout.css

    Is this possible to do?

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You would have to modify the script itself to change where it generates the snowflakes. Where you include the script really has no bearing on what elements it affects.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •