answered question

answers (2)

cp24
0
Votes
BEST ANSWER  chosen by asker   |  cp24  |  April 19, 2009 02:24 PM
Please note: if the following answer is not clear - see the attach image. It looks like Mahalo also uses "strip_tags" in the answer form. The "strip_tags()" function strips a string from HTML, XML, and PHP tags. http://www.w3schools.com/php/func_string_strip_tags.asp Basically, if you put a /br/ tag strip_tags() would remove it. In the example from the above link: echo strip_tags("Hello world!"); ?> Because of the strip_tags, the text is displayed as Hello World in plain text (instead of bold). I managed to download and analyze your template and found the line you were referring to: "-- strip_tags(get_the_excerpt(), ''); ?> --" The above code means, it would strip everything but the and tags. To ensure that the is not being 'stripped' just add it to the exception list in between the ' ' Try this code instead: '); ?> Please note, after ' I have added . You might also need to add too - just in case it doesn't work. Basically, this code '); ?> means "strip all HTML tags but "
Asker's rating:  

Comment
thef1blogg...
thef1blogger  |  April 19, 2009 03:45 PM
I tried to add br> at the end of a> but it didn't work. I also tried adding

with no luck.
Then I tried to replace it with only p>

and boom! it's working..

BTW, I didn't type "<" before the codes because it doesn't show anything in that case!
thef1blogg...
thef1blogger  |  April 19, 2009 07:24 PM
thanks
thef1blogg...
thef1blogger  |  April 19, 2009 07:28 PM
I attached the screenshot since the html tags are not seen here.
Please refer to the screenshot for my reply;
http://farm4.static.flickr.com/3645/3456056745_2aeda1f2a7_o.jpg
cp24
cp24  |  April 20, 2009 02:45 AM
Glad you work it out. BTW, nice blog with good contents.
thekid
0
Votes
thekid  |  April 18, 2009 09:51 PM
Hi thef1blogger,

Are you making sure to add a line break tag in the code?
example:

“Hi there!< br >
How can I add lines between paragraphs?”

http://www.w3schools.com/TAGS/tag_br.asp
Comment
thef1blogg...
thef1blogger  |  April 19, 2009 11:26 AM
Thank you for your answer,
I tried everything including your solution but it doesn't work.
I think it may be related to the wordpress theme that I'm using.
I found below line in my theme's home.php file and I think removing strip tags may solve my problem but I just don't know how to remove it. When I remove the line completely I lost the excerpt at my homepage too.

?php echo strip_tags(get_the_excerpt(), ''); ?>

you can check my website to get a clear picture;

www.thef1blogger.com
thekid
thekid  |  April 19, 2009 01:45 PM
Hmm well here are some things you might want to check out:

http://codex.wordpress.org/Template_Tags/the_excerpt

and you might have some luck with this plugin http://wordpress.org/extend/plugins/advanced-excerpt/
140

ask any question

Top of Page
Buy Mahalo Dollars
WITH CREDIT CARD OR PAYPAL

Please log in to use this function.