Fixing the content
-
My posts are all like this:
[gallery 1] <img> blurb 1 <!--more--> blurb 2 [gallery 2] blurb 3 etcIn my theme the loop calls
the_content();
Somehow it doesn’t respect the more tag in the posts. It shows blurb 1-3 all to the end.If I change it to the excerpt it seems to cut at the right place, but then I need more code to get the read more tag back.
I saw in https://codex.wordpress.org/Template_Tags/the_content
under Overriding Archive/Single Page Behavior
I can use<?php global $more; // Declare global $more (before the loop). $more = 0; // Set (inside the loop) to display content above the more tag. the_content("More..."); ?>This now shows
[gallery 1] <img> blurb 1 <!--more-->But I want to strip all img and gallery from the excerpt because the featured thumb is already there.
What should I do?
The topic ‘Fixing the content’ is closed to new replies.