Hello there,
I have setup this site: www.casasport.org using a WP template. I’m trying to edit the coding for the homepage. There are three “preview boxes” for pages along the bottom: About, Sponsors, and Player Spotlight. I can point it to the page in the theme options, however if the About page is 500 words or 1000 words it will show everything on that page in the preview box.
Is there a way to add just a snippet of code to only pull in the first say 25 or 50 words so the homepage can only show that and you need to click the “read more” link to jump to that page?
I hope I’m explaining myself well enough. If you need me to clarify please don’t hesitate to ask.
Thanks for any and all help. The part of the home.php that includes the home boxes is below.
Lorne
<!-- BEGIN HOME CONTENT -->
<!-- begin home boxes -->
<?php $box1=get_post(get_option('boldy_home_box1'));
$box2=get_post(get_option('boldy_home_box2'));
$box3=get_post(get_option('boldy_home_box3'));
if(get_option('boldy_home_box1')!= null && get_option('boldy_home_box2')!= null && get_option('boldy_home_box3')!= null){?>
<div id="homeBoxes" class="clearfix">
<div class="homeBox">
<h2><?php echo $box1->post_title?></h2>
<?php echo apply_filters('the_content', $box1->post_content);?>
<a href="<?php echo get_option('boldy_home_box1_link')?>"><strong>Read more »</strong></a>
</div>
<div class="homeBox">
<h2><?php echo $box2->post_title?></h2>
<?php echo apply_filters('the_content', $box2->post_content);?>
<a href="<?php echo get_option('boldy_home_box2_link')?>"><strong>Read more »</strong></a>
</div>
<div class="homeBox last">
<h2><?php echo $box3->post_title?></h2>
<?php echo apply_filters('the_content', $box3->post_content);?>
<a href="<?php echo get_option('boldy_home_box3_link')?>"><strong>Read more »</strong></a>
</div>
</div>
<?php }?>
<!-- end home boxes -->
<!-- END HOME CONTENT -->