I’ve created a super simple contact page template, just content and a contact form, like so:
[code moderated – please follow http://codex.wordpress.org/Forum_Welcome#Posting_Code when posting code]
I then need to insert this page into another page (say, homepage) – using custom query. The query is irrelevant, I think, but it’s basically getting all created pages and displaying their contents:
It seems to work fine for normal pages (those without a custom template), but for this contact page, I’m getting from the query is the content (the_content()) but not the form.
I also have another custom page template that I’m trying to pull into the homepage, and it’s doing the same thing.
Any idea what would cause this problem? Never seen anything like that and I’ve been working with WordPress for years now…
Thanks in advance!
EDIT: I now see my problem –
the_content()in my query works correctly – it pulls the entered content of the page. What I’m trying to achieve is get the entire content of the page, including my custom HTML, much like
include()function in PHP. Would love some tips on how to do that.
- The topic ‘Page template doesn't display simple HTML if inserted into other page’ is closed to new replies.