WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom plugin that pulls video and images out of a post and puts them into a nicely formatted set of galleries. The only problem is that the plugin doesn't allow me to put a video or image before the more tag without creating a mini gallery. Is there a name or way to adjust my plugin to make it only read the_content that comes AFTER the more tag?

share|improve this question
up vote 5 down vote accepted

I think you can use the get_extended( $post ) function; that returns an array with different parts of the content. See this example which works inside the Loop:

$content_arr = get_extended( get_the_content() ); 
var_dump( $content_arr );
echo $content_arr['main'];  //Display the part before the more tag
share|improve this answer
thanks this is exactly what I was looking for! – Hunter Nelson Oct 9 '12 at 9:31
@Hunter Then please mark it as solution (the check mark below the voting arrows on the left). Thanks. – kaiser Oct 15 '12 at 1:42
I have logged in and there are no arrows that allow me to mark as a solution. I also can't upvote your answer. – Hunter Nelson Oct 18 '12 at 17:33
@HunterNelson your question belonged to duplicate "unregistered" account. I merged it for you and you should be able to accept answer now. – Rarst Oct 18 '12 at 17:38
Got it thanks!! – Hunter Nelson Oct 18 '12 at 17:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.