WordPress.org

Ready to get started?Download WordPress

Forums

Page template doesn't display simple HTML if inserted into other page (1 post)

  1. Jusi
    Member
    Posted 2 years ago #

    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:

    [dito]

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic