• I’ve done this before with MovableType, but can’t figure out how to do it with WordPress.

    I want to have a php include which calls the file that posts are being written to in WordPress, which is installed in another directory. This has a number of benefits, but doesn’t work because the WordPress index file just pulls the post live from the database it seems. If you do a php include, it can’t pull them correctly as it’s in another directory.

    With MovableType, I can just setup a “new template” file, and then put in a few MT tags, and tell it where I want the output file. Then it makes an outfile with actual content, and not php commands.

    I sincerely apologize as I know I am not communicating this properly, but hopefully someone will get it and.. help :-).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Why do you want to do that?
    What do you want to achieve?

    So, what you’re trying to do is to have WP installed in one folder and have it show up at another URL?

    (former MT user here)

    Thread Starter slowdive

    (@slowdive)

    No. Basically I have a band page — I want the band to be able to write on their blog — and I don’t wordpress to actually touch the file I’ve designed. I want to have a php include which calls a very modified template/index.php file (which I strip down to things such as the actual post, posted by, time, and comments..).

    I use this technique all the time with MT for my job, where we have many pages and we don’t want MovableType in control of the pages. So we just make it output separate files and do php includes to place them wherever we want within a page design. That way there is no separate CSS and no possibility of the blog manipulating anything except what I’m calling in the php include.

    So is there an way I can have WP output to a file that includes the actual posts made, instead of just raw php code?

    I’ve used WordPress for a while in a more standard way and love it — but MT and WP are so different, I can’t wrap my head around how I’d get WP to work in this manner..

    The way to do this in WP is to embed “The Loop” into your pages.

    http://codex.wordpress.org/The_Loop

    The Loop is the bit of code that pulls posts out of the database and displays them.

    As near as I can tell, all you’d do is call the wp header in the file you designed, and then plunk the loop in your file as well. Got a link?

    Yep, WP just does it all dynamically. It doesn’t build any actual pages like MT does.

    Yes, you’re correct, WordPress generates all pages dynamically. I think there is a plugin that can do some caching and/or static content stuff like MT could, I think it’s called wp-cache(?). There are also some static page plugins, I’m not sure if they’d do what you’d like.

    Good luck!

    Thread Starter slowdive

    (@slowdive)

    Wow, this helps tremendously folks. Thank you so much.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hard to explain, please read! :-)’ is closed to new replies.