Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5889

    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!

    #52087

    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 } ?>

    #52088

    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

    #52089

    Hey,

    usually adding !important after every element works, i.e.

    .buy {
    float: right !important;
    padding: 10px !important;
    }

    Hope it works, let me know =]

    #52090

    Ha! I just assumed I hadn’t set it up right… never thought to give the !important a try… will check that out. Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Add static content to homepage?’ is closed to new replies.