Skip to content
- First,
get_footer()
is meant to load page level template files,
not post-level ones. You should be using get_template_part()
instead.
- Shortcodes execute as a filter on
the_content
. Per the norms of
all filters, they should return
content, not echo
it. echo
ing
content will cause effects like you are seeing. Apparently, the
template file you are loading with the shortcode is printing
charaters to the screen instead of return
ing a string as it should
be.
- I don’t know where you’ve read that about shortcodes and PHP but it
is is sort of nonsense, at least as you’ve presented the case.
Shortcodes virtually all do more, much more, than echo
static
strings– take a look at the Core gallery shortcode, for example. To do that, you need PHP.