1

I have user dynamic web application, however it also contains some static pages(like Terms of Usage,...) and will contain some articles - for administration of this content I would like to use wordpress - so I wonder if there is a way how to include some wordpress's PHP which would only include the processed the_content(); and needed WP objects?
Or at least is there some way how to get raw html from data extracted from wordpress DB?

PS: Iframe solution just seems wrong to me... and would not work for me anywas...

2 Answers 2

3

If you're building your own php and don't want to use custom templates / post-types / etc... You can simply load WordPpress via

<?php include 'path_to_wordpress/wp-load.php'; ?>

And then you will have access to all the Wordpress Functions / Objects :)

Hope this helps.

Sign up to request clarification or add additional context in comments.

6 Comments

Nice, this seems to do exactly what I need :)
and what do you think about the require('./wp/wp-blog-header.php'); ?
wp-blog-header.php loads wp-load.php and also templating. But in youre case I don't think you need it since you're building your custom php file. The was a discussion on Wordpress a long time ago if you wanna read more: wordpress.org/support/topic/integrating-site-and-blog-1
So if I want to use custom-programmed-shortcodes (basicaly in functions.php of the theme) - then I would have to include wp-blog-header?
Things like is_404(), is_seach(), is_front_page(), is_home(), is_tax(), etc... Won't work :) Your shortcodes are safe ;)
|
1

Why don't you build the entire webpage using Wordpress? You can do pretty anything with it, especially if you use custom post types and custom fields.

Anyway, I found this forum threat that might contain information useful to you http://wordpress.org/support/topic/adding-wordpress-page-to-another-html-site?replies=5

1 Comment

WP has poor security and performance for this particular usage. So I would like to use it as static-page-administration only :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.