I'd like to add an intro paragraph to my homepage that is static above my posts. Right now, I do this by making a post sticky, but I don't like that the date / tweet box shows on the right, which can make the blog look stale if I don't keep editing the publish date. Can you suggest a better way to add some static content without the box? The site is http://rufftoyreviews.com.
Thanks!
Add static content to homepage?
5 posts from 3 voices-
Posted 1 year ago #
-
Hey,
it's not a better solution (because styling work, etc. will be required) but you can hardcode your text in index.php. Another option is to hide the tweet box/date - in index.php replace:
<div class="date_container"> <span class='day'><?php the_time('d') ?></span> <span class='month'><?php the_time('M') ?></span> <span class='year'><?php the_time('Y') ?></span> <?php if($k_option['single']['acc_tw'] != '') { ?> <div class="tweetmeme"> <script type="text/javascript"> tweetmeme_source = '<?php echo $k_option['single']['acc_tw']; ?>'; tweetmeme_url = '<?php echo get_permalink() ?>'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script> </div> <?php } ?> <span class='date_container_bottom'></span> </div><!-- end date -->with:
<?php if (!is_sticky()){ ?> <div class="date_container"> <span class='day'><?php the_time('d') ?></span> <span class='month'><?php the_time('M') ?></span> <span class='year'><?php the_time('Y') ?></span> <?php if($k_option['single']['acc_tw'] != '') { ?> <div class="tweetmeme"> <script type="text/javascript"> tweetmeme_source = '<?php echo $k_option['single']['acc_tw']; ?>'; tweetmeme_url = '<?php echo get_permalink() ?>'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script> </div> <?php } ?> <span class='date_container_bottom'></span> </div><!-- end date --> <?php } ?>Posted 1 year ago # -
Thanks for your help. I added it to index.php and styled it...Much better now. I tried adding the styles to custom.css, but it didn't take. Do you have instructions somewhere for getting custom styles to work? Right now, I have it in the styles.css file, but would like to keep the core code clean for upgrades. Thanks so much for your help. -Janet
Posted 1 year ago # -
Hey,
usually adding !important after every element works, i.e.
.buy { float: right !important; padding: 10px !important; }Hope it works, let me know =]
Posted 1 year ago # -
Ha! I just assumed I hadn't set it up right... never thought to give the !important a try... will check that out. Thanks.
Posted 1 year ago #
Reply
You must log in to post.














