Hi.
I want to set read more
for my cms posts.
The code i found was <?php the_content( $more_link_text , $strip_teaser ); ?>
but still don't know how and where to use it.
Any suggestion?
Niloofar24
15
Posting Whiz
Recommended Answers
Jump to Post
<?php the_content( $more_link_text , $strip_teaser ); ?>
is for wordpress usage.
Jump to Post
<?php the_content( $more_link_text , $strip_teaser ); ?>
Codes like this is from wordpress. it has its own codes for it CMS.
The Usage of that code is Like a movie trailer. in order to see the full description you need to click the
$more_link_text
+$strip_teaser
to see the full …
Jump to PostI wonder you 'read more' button will behave like one of the following?
1. link to actual post
2. it will trigger ajax to get rest of the post and append to it
3. show the rest of the post(The rest of post already loaded in div which hidden with …
Jump to PostWell i think you should trim some of the words. then add the
read more
well ill do it this way though
// strip tags to avoid breaking any html $string = strip_tags($string); if (strlen($string) > 500) { // truncate string $stringCut = substr($string, 0, 500); …
Jump to Post
preg_match('/^.{1,260}\b/s', $body, $match);
ill start piece by piece
/^
this is the start of your variable whitch is the$body
.
the terminator or the;
in php to start another statement{1,260}\b
this is the boundery form the very beggining of your$body
up to the end the\s
- Whitespace e.g …
All 18 Replies
lps
71
Posting Pro in Training
jj.dcruz
0
Junior Poster
lps
71
Posting Pro in Training
Niloofar24
15
Posting Whiz
jj.dcruz
0
Junior Poster
lps
71
Posting Pro in Training
Niloofar24
15
Posting Whiz
lps
71
Posting Pro in Training
Niloofar24
15
Posting Whiz
Niloofar24
15
Posting Whiz
jj.dcruz
0
Junior Poster
lps
71
Posting Pro in Training
Niloofar24
15
Posting Whiz
jj.dcruz
0
Junior Poster
lps
71
Posting Pro in Training
Niloofar24
15
Posting Whiz
jj.dcruz
0
Junior Poster
Niloofar24
15
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.