-
going out of my realm now can try something like this
in functions.php
PHP Code:
function ShortenText($str, $length) {
$str = strip_tags($str);
$str = explode(" ", $str);
return implode(" " , array_slice($str, 0, $length));
}
then change
PHP Code:
<?php the_title(); ?>
to something like this
PHP Code:
<?php echo ShortenText(get_the_title(), 2); ?>
a php guru may see a error in this and help kinda worked but not perfect on my test site.
-
Hi,
Need more info on this.
Where do I paste the code in functions.php
I placed at the bottom and it brought the site to a screeching halt.
Even the admim quit working had to ftp. the backup twice.
got this error when you went to the site.
Parse error: syntax error, unexpected $end in /home/sami/domains/freewomensblogs.com/public_html/wp-content/themes/freewomenstheme/functions.php on line 417
Sami
-
should add it to the top of the function.php right after the <?php
-
Hi Mr.Bill,
That worked. 100% :) Thanks a bunch. :)
Sami