PHP Code: <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo thman_get_limited_string($post->post_title,13); ?></a> Because there isn't enough space for the whole title the title has to be cut but this code creates a second line if the last displayed word* is too long. Example 1
PHP! How to insert if function? Or better using another solution?
4
Question:Because there isn't enough space for the whole title the title has to be cut but this code creates a second line if the last displayed word* is too long.PHP Code:<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo thman_get_limited_string($post->post_title,13); ?></a>
Example 1
Whole title: 12345 123456 12345678* 12345678 1234567890
(2 Lines)
12345 123456
12345678*...
Example 2
hole title: 123 123456 123456 12345678 1234567890
(1 Line)
123 123456 123456...
How can I change the code to insert a <br /> if I get Example 2? And if I get Example 1 then a <br /> shouldn't be inserted.
PHP Code:
Solution?
Whole title: 12345 123456 12345678* 12345678 1234567890
(2 Lines)
12345 123456
12345678*...
Solution 2
hole title: 123 123456 123456 12345678 1234567890
(1 Line)
123 123456 123456...
<br />
- Tim Franklin
- [1] reply
- tgma
- [1] reply
Next Topics on Trending Feed
-
4