I need to determine if the current post has a "more" tag. I'm currently using
$pos=strpos($post->post_content, '<!--more-->');
Am I missing a built in method similar to has_excerpt()?
|
I need to determine if the current post has a "more" tag. I'm currently using
Am I missing a built in method similar to has_excerpt()? |
|||
|
Quite simply put: there is no built in function that does the same thing as your code above. Bonus content: More tag tricks |
|||
|
|
|
Making a quick note of the codes we could use to show Code #1 (Recommended)
(Credit: MichaelH) Code #2
(Credit: Michael) Basically does #1 the other way around. Code #3
(Credit: helgatheviking) For use only in edge cases where you cannot use Making it more conditional:
What does it do? If the page shown is home, archive or search results page, then show |
||||
|
$pagesglobal should hold a value representing the number of pages(if the post is paged, ie. has content that spans pages, eg. it has more!).. – t31os Jan 6 '12 at 19:28