Use WordPress as a PHP Framework for Your Static HTML Pages
112WordPress is a great solution for creating blog, but that isn’t all it can do. The incredible power and simplicity of this platform allows you to create personal web pages or entire web sites in minutes, using all the functions of this environment with minimal effort.
With WordPress, you can develop an entire professional web site (with or without a blog) even though you know just a little bit of HTML! Read on to see how.
The Whole Platform in a Regular PHP Page
To begin developing your ‘wordpress-injected’ web pages, you need a WordPress installation, a little of HTML knowledge (PHP is better), and a HTML Editor (Notepad is enough!).
WordPress works on PHP pages, but if you only know the HTML please don’t worry. For our purpose, that’s enough.
Create a file named test.php and save it in the root of your blog (the blog root is the same directory where you see the files wp-config.php, wp-login.php or wp-blog-header.php).
Now, with your editor, edit test.php and add this line to the top of the file:
<?php include(’wp-blog-header.php’); ?> |
And you’re done already! This great but simple command make availables in your page all the features, the commands and the functions of the WordPress platform!. To check that it’s working, add some more code, e.g:
<?php include(’wp-blog-header.php’); ?> <html> <body> <div class=”name”><?php bloginfo(’name’); ?></div> <div class=”description”><?php bloginfo(’description’); ?></div> </body> </html> |
Then save the file and load it up in your browser.
If you’re working on the web (and didn’t make a mistake!), you can see your page from the main directory of the blog (so, if the blog address is http://www.yourblog.com,then the link will be http://www.yourblog.com/test.php).
In this test page you will see the name and the description of your blog, taken directly from the WordPress database.
Write a Complete Webpage in 10 Seconds
For an example of making good use of this, the first utilization of the WordPress platform would surely be to write a complete web page with the same themes as your blog in a few seconds.
Create a new test.php page within this code:
<?php include(’wp-blog-header.php’); ?> <?php get_header(); ?> <!– Put here your personal contents in HTML or PHP –> … <!– End personal contents –> <?php get_footer(); ?> |
In this page, using the get_header() and the get_footer() functions, you copy into your page the same header and footer as your blog, so you must only write the content of the page! Great!
If you want include the sidebar too, just modify the code:
<?php include(’wp-blog-header.php’); ?> <?php get_header(); ?> <!– Put here your personal contents in HTML or PHP –> … <!– End personal contents –> <?php get_sidebar(); ?> <?php get_footer(); ?> |
Really, really easy! With the get_sidebar() row you take the blog sidebar from WordPress and paste it into your web page!
If you want know all the functions of the WordPress platform (Which you can now use), you can begin to read here.
Why (and when) When To Use WordPress on a Webpage
Anything you can do with a WordPress function or a WordPress plugin can be included in your personal web pages, so, when you include the wp-blog-header.php page in your web page, you are using WordPress as a great framework to develop web sites.
At this point a good question would be: “but why don’t I use a simple WordPress page with a custom template?”
Yes, you can do it, and in some situations this is the better solution.
The big advantage of this system is that you have complete control over the file. You can choose to embed only one plugin, one script etc. You can leave out the sidebar, pull in a different one, or do whatever you want. You could do this using WordPress Page Templates, but they are more hassle than using this one line of code is.
What Can I Do With This Technique?
Some scenarios where it could be useful to write a web page using the ‘Wordpress injection’ are:
- When I have a blog and I want expand it into a blog + web site.
- When I love a WordPress theme and I want it for my website.
- When in my blog I want to implement AdSense for search results on my own page.
- When I want add some little web application into my existent blog or i want include any non-blog area.
At this point, if you are interested, begin to program your web page, include the wp-blog-header.php page in your code and start testing the power of the WordPress framework! And if you have any doubts or feedback about this article, I would love to hear it.
Enjoy this post? You should follow me on Twitter!
I think that using custom templates for pages is better option because as you also mentioned there is more control and all WordPress functions works just fine with the template. However, if you are a beginner to programing languages such as PHP, you can make some pages like that. I still think that you could find enough information at codex.wordpress.org for making good and reliable pages using the templates.
the right response is: “Depend!”
Depend from the situations and your target.
For many situation to use a custom template, isn’t an optimal solution (for my opinion, of course).
Great idea!
Wow, interesting and simple idea.
Yes, it easy!
I belive that it could to be an good starting point for beginner that want to start to use PHP.
.-= RobbyAnz´s last blog ..Il miglior servizio online per creare il tuo forum gratis =-.
D’oh! Got thrown by the “Click to Edit” feature (which didn’t work forme for some reason). Feel free to remove the extraneous comments.
Thanks and cheers.
.-= David´s last blog ..New site and blog =-.
A lot of people are actually doing this! I’ve come across a lot of sites that do this. This will really make web pages easier to make. Even those who are not very experienced about coding and HTML and scripts and the like will be able to customize their own sites through WordPress. Thanks for sharing this, very useful!
Thanks, really helpful! That’s what I’ve been looking for…
Grazie, utilissimo. Un po’ è quello che, a tentoni, ho cercato di fare nel mio sito.
For some reason this isn’t working for me.
I copied the first box of code to try, uploaded test.php file with nothing but those 7 lines in it, and this is what appeared:
Fatal error: Call to undefined function: bloginfo() in /homepages/16/d290882405/htdocs/blogname/blog/test.php on line 4
I did not make a mistake copying 7 lines or putting test.php into blog directory.
Any suggestions?
replace the quotes and single quotes. For some reason if you copy and paste his code the program misreads the quotation symbols included in the copied text.
same here: Fatal error
please explain!!!
Probally in your case the include don’t find the ’wp-blog-header.php’ file.
Verify that this file is in the same directory of the test.php file, thus if the root of your blog is
http://www.sitename.com/blogxxx , try to change the include in this form:
Is this supposed to have the blog-header and blog-footer actually appear? Because my page is just “#9ACD32” background color with 4 lines and an image. Here’s the entire test.php I’ve uploaded:
test for header and footer
So what do you think friends?
Is this a fabulous concept?
Does this make for the basis of a good web site?
We shall see….
Am I leaving something out?
Sorry, in my above post I tried to show an example of the entire file and the code didn’t appear, just the 4 lines.
Here’s the link to my test page LINK Please check outView / Page Source to see what the test.php file looks like and let me know if I’m leaving something out. Thanks.
Since the header and footer aren’t appearing, I don’t understand what this does?
Please, contact me Here.
I will help you in private.
:)
.-= RobbyAnz´s last blog ..Una pagina stile facebook nel tuo blog con Lifestreaming per WordPress =-.
[…] منبع این مطلب اینجاس […]
Can anyone help me. I am in urgent need of help.
I want to use the default visual editor in the gallery at the image description.
can anyone give me some codes how to use it.
You are right, it’s about Depend on the case. which one better which one the best.
This is another solutions….
.-= Freelance Jobs´s last blog ..Flippa.com Clone by greg2414 =-.
The amazing power of one line of code.
I’m interested in using wordpress to create a site that looks like an ordinary website… not a blog. So I have been looking at custom templates in order to create a number of static pages. That appeared to solve my problem.
I’d also thought about using a theme that I liked and producing a number of pages made up of php includes from the themes components, removing the wordpress loop element and not using WordPress.
I figured that this would give me a quick site with the look of the theme but without uploading WordPress, creating a database etc.
Using this simple line of code looks like another option for creating a quick website on the back of a great theme.
Bottom line? I’ll have to give it some more thought.
I too am interested in using WP for a site that looks like an ordinary website, and it would have a Blog and News section. It sounds like I need to use custom templates for the static pages and try to integrate the Blog/News sections with the other pages/sections. But it’s impossible to find documentation on how to accomplish this. This site is the first to provide a clue that it’s possible. Milie Grazie
The first to produce a good book on doing this will make a killing.
( i am really _tired_ of the millions of themes out there that all basically end-up looking like a WP site. lame)
I’m happy for your words. :-)
thank you!
[quote]The first to produce a good book on doing this will make a killing.[/quote]
How much would you pay, and what should it include???
It should have all the elements and instructions for creating web sites that are not a BLOG. It should be a book the focuses on using CMS and customizing via plug-ins and widgets to make it an on-blog website. It should include a good tutorial on how to have many page and for each Page to have an easy way to display in a side-bar column all the sub-pages on Page per page basis.
Costs? how about $45.00 – $55.00USD
Maybe you can help… I want the theme I am creating to ship with a custom search page in place. I know how to make a search page template, but that requires the end user to create their own page named Search or whatever and then apply the correct template in admin. That’s not what I want. So your wp-blog-header technique looked promising, but I want to use something like this within the theme, not the root directory, so that the page is theme specific. Ideas?
This is very cool. I use this technique on several sites I manage.
Good timing for me, I guess. I was thinking of doing this on one of my sites when I’ve stumbled upon this entry while looking at old PBD posts.
I’ve had it all planned out now, but I guess seeing a whole blog entry on this technique helps! I decided to use WordPress for a simple website because of the awesome SEO. I’ve got another site that has nothing in it [just the LaunchPad page], but with the help of WordPress, it’s the first result on Google for its keywords. As long as your keywords are in your domain name, site title, & index page, you’ll be found.
I think good tutorial on how to do this would be an awesome documentent for a WordPress expert to produce. Hopefully one is in the works ;->
[…] Use wordpress as a php framework for your static html pages […]
One problem I see to using WordPress to develop and maintain sites is this.
All WordPress theme source code (aside from actual graphics and Javascript used) MUST be licensed like WordPress itself. Namely as a GPL derivative work.
If I use WordPress to design and then create a theme for my site guess what? The source code to that custom theme does not belong to me it belongs to the masses under the GPL!
It is true that I don’t have to release that code to the masses but it is nevertheless not my code to do with as I wish. Rather the code that I have created belongs to WordPress. It can only be licensed under the GPL.
For most people that’s not a problem but for someone who wants the most flexibility with what they create on their web site…it is.
I think WordPress is way overused on sites that really don’t need 1/10th of it’s functionality. Sites that could be created in a much easier way by using PHP scripts to read text files that would then be turned into web pages dynamically without adding the bloat of WordPress to them.
My site for example does just that. Without WordPress! And it is far, far easier for me to maintain and add pages to my site than to do the same thing through WordPress.
Carlos
Hi Carlos!
I agree with you and I have made my own text file based CMS called Clesto.com.
For a simple semi static web site WordPress is like a Ferrari for the grand mother who want to go and buy bread for breakfust.
nice!we will use it.
This is very interesting and potentially powerful, thanks! Could you explain how to enable plugins on a static html as I would like to restrict access to a static html using the private only plugin? In testing no plugins seem to be actiavated when you add:
so the page is accessible, if I add
the page is not accessible even if I AM logged in.
Thanks
Titus
sorry my code refs were stripped:
In testing no plugins seem to be actiavated when you add:
include(’wp-blog-header.php’);
so the page is accessible, if I add
auth_redirect();
the page is not accessible even if I AM logged in.
Thanks
Titus
[…] comprehensive and complete theme development tutorials out there, split into more than 16 parts. Use WP as a PHP Framework for your static html pages – A very interesting tutorial on how to use WP as a PHP […]
[…] Use WordPress as a PHP Framework for Your Static HTML Pages – A very interesting tutorial on how to use WP as a PHP framework. […]
I would love to use this, but I was unable to get it to work. I changed the quotes as you told another poster, but that did not work either. i will leave it up so that you may navigate to http://MyMayorSucks.com/crony/test.php
Awesome article. I would really like to use this technique as WordPress is an awesome platform. Thanks, and I look forward to your reply. Wayne
hi……thanks so much.
I’ve been in trouble for this problem .
:(
Putting static pages in root of WP setup is easy to do, and makes them available to all installed themes. For dynamic pages, however, modified templates go more easily in theme folders, so that tweaks are possible through the Page editor. To demonstrate this, merely switch between classic and default themes; text that aligns well in one will be too far left or right in the other. Adjustments can be made by inserting , but the widths and horizontal shifts will differ by theme.
For any theme, one can subtract or move blocks of code. For example, I have a site where I deleted the sidebar and comments, another where I moved the search box on the sidebar and deleted the meta, several where I simplified the header and footer to reclaim wasted space. Also note that many WP (and other) themes are grossly non considerate of color blind and seniors, thus challenging about one fourth of potential visitors.
Default installations invite site hackers. Easy changes can greatly increase WP security. Moving HTML pages inside WordPress can improve security as well as make available a host of functions that would otherwise need add-on scripts.
Vanni said a description of such tips would be worth $45 to $55. I am asking $27 at http://securehtmlpagesinwordpresscms.com. The first page demos concepts, then “View Table of Contents” link shows scope.
Side-note: I recently saw an internet marketer offering guide for static pages in WP with but a small fraction of RobbyAnz’s information, claiming “breakthrough discovery.” He must be either naive or a liar.
By the way, my paragraph indents were lost. I would change to double space, but don’t see edit option.
“made by inserting , ” should have been
“made by inserting DIV, ” or & lt; DIV & gt ;
to make it print to screen.
I got carried away.
Robby, at http://www.mondositiweb.com/domanda/, your captcha shows nothing to match. Take a look at http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/.
Great tip – I have never heard of it and it is great for including non-blog pages on a blog.
A recommendation to both the article writer and commenters is to use the code element when displaying code. That HTML element is made for that and the quotation mark in code will not get broken. It is then up to the template designer to make sure that it is styled correctly. Example:
Jim, I don’t see your example. Perhaps you need to substitute some characters, such as & lt ; code & gt ;
Ok, let’s try again:
<?php echo "hello world!";?>
If that does not work then I would recommend the creator of this blog to look over his settings.
That worked, good. Notice the huge difference between ” (breaks code) and
"
(correct).Thanks, Jim. In my ebook, I made a point of correcting “smart” (i.e., DUMB) single and double quotes. It seems that word processors have wrongly set the standard for WordPress, browsers, et cetera. I have not found a way to automatically turn off substitution.
I don’t mean to hi-jack this thread, but before i sign off for good i would like to recommend that people look at two great cms that easily allow what has bee debated herein. Expression Engine Core is free and can do what WP can only do with too many plug-ins. And the other is TextPattern, open source, that can do what WP does more easily even with having to also rely on plugins. I spent a disastrous month trying to tweak WP to work as a cms. Why bother folks. Get something that is there already. WP is great for simple Blogs ,after that it’s basically a pain in the butt. Bye
[…] Use WordPress as a PHP Framework for Your Static HTML Pages – A very interesting tutorial on how to use WP as a PHP framework. […]
This is an interesting approach and people who still think of WP as just a blogging platform should read this.
I agree WP is a pain for complex websites but then it’s not supposed to be used for complex sites, in the same way that I wouldn’t recommend drupal for blogs ! Although some people do use it.
[…] Use WordPress as a PHP Framework for Your Static HTML Pages – A very interesting tutorial on how to use WP as a PHP framework. […]
Informative, I know nothing about codes, but I can always find the proper ones on the net, thanks for all the time.
I’m having a problem at grosstechnologiesinc.com/test.php
Warning: include(0php’) [function.include]: failed to open stream: No such file or directory in /home1/grosstec/public_html/test.php on line 1
Warning: include() [function.include]: Failed opening ‘0php’’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home1/grosstec/public_html/test.php on line 1
Fatal error: Call to undefined function bloginfo() in /home1/grosstec/public_html/test.php on line 4
cold you please help? Thanks!
thank for your advise
:-)
Excellent tip! This will sure come in handy for a project that I am working on. I would also check if this works in subdomains because if its does, I guess I have just stumbled onto a goldmine! Thanks a ton for this great insight. You’re just too good :-)
[…] Uso WordPress como un Framework PHP para sus páginas HTML estáticas – Un muy interesante tutorial sobre cómo usar WP como un marco de PHP. […]
Has anyone noticed the page title shows ‘page not found’? Everything looks correct but the title shows not found.
very good this post
thank you Nima! :-)
Yeah, wordpress has earned its recognition as a great CMS. But the way you’re talking Robby, it’s really a great idea. Though I think you’re idea is a kind of poison for web designers because tons of royalty free WP themes are out there and least you need to work with layouts and graphics.
Thanks a many for putting this in place!
wordpress as php framework on my website is very cool thank yu very much for sharing this.
thank you,
Anadolu.
[…] Use WordPress as a PHP Framework for Your Static HTML Pages – A very interesting tutorial on how to use WP as a PHP framework. […]
Great post Robby!
One question, would this method work on html pages (.htm) that are parsed for php?
On one of our websites I use php for the navigation parts of the (html) pages, so I already parse for php.
It sounds like I should be able to, using your method, add code on the html pages to e.g. draw recent posts from the blog?
(the blog is in a subdirectory of the website)
Thanks!
Yes, of course!
You must take attention at some details, but it will work without problems! :)
Thanks Robby for replying.
Great!
Robby,
After adding the include command into a static .htm page (parsed for php),
I run into an unexpected error:
Fatal error: Call to undefined function language_attributes() in /path-to-header-not-shown-for-security/header.php on line 2
Do you have any idea how to solve this?
Many thanks!
[…] Use WordPress as a PHP Framework for Your Static HTML Pages (使用 WP 作为静态 HTML 页面的 PHP 框架) – 非常有趣的教程:怎样使用 WP 作为一个 PHP 框架。 […]
Interesting, I will try it soon
I use the Headway WordPress theme. How do I make this work with that theme? What are the INCLUDE files I need?
Thanks
Thanks for telling this and how easy it is to use WP.
[…] 另一個方法就簡單多了,只要把檔案放在WordPress的根目錄就可以了(WordPress的根目錄指的就是有wp-config.php的那個目錄),而且不侷限為.php檔,其他的靜態HTML也都可以;這篇Use WordPress as a PHP Framework for Your Static HTML Pages 介紹了多種用途,例如只要在放入WordPress根目錄裡的測試PHP檔第一行加上 […]
[…] 另一個方法就簡單多了,只要把檔案放在WordPress的根目錄就可以了(WordPress的根目錄指的就是有wp-config.php的那個目錄),而且不侷限為.php檔,其他的靜態HTML也都可以;這篇Use WordPress as a PHP Framework for Your Static HTML Pages 介紹了多種用途,例如只要在放入WordPress根目錄裡的測試PHP檔第一行加上 <?php include('wp-blog-header.php'); ?>就能使用WordPress的所有內建函數了。下例就是把部落格的名稱與描述顯示在網頁上: […]
I appreciate the work that your are doing!!
Thanks for this. Being trying forever to get some php to work on wp. Being a total newbie at php/wp/general coding it was major head banging against the wall exercise, till I found this article. So many thanks and bonus karma your way.
Robby, I found your example and it is very useful for something I need to do – include in my WordPress site a large number of pages that are generated offline as static HTML (though I changed them from.htm to .php).
I need to ahve those pages show the WP header and footer but otherwise in the middle of the page show “static” html.
Using your suggestion I can load the WP environment and show correctly the header and footer. However, it only works in Firefox.! IE gives page not found. I’ve sepnt a coupe of weeks on trying to understand/debug and I am not making much progress. I though maybe you have some ideas.
Example: http://komotion.com/2.php
Any ideas?
I found the solutionto the 404 error given by IE; quite interesting. Solution is to not load wp-blog-header.php and load wp-config.php instead.
For more about his, see:
http://www.adrogen.com/blog/wordpress-wp-blog-headerphp-causes-404-in-ie/
Thank you Strategerizer for this! Your code should be included in this Blog post. You solved my “Page Not Found” errors.
I cant even get this simple example to work properly.
Although it displays the title and categories down the left of the page it is not formatted correctly. So much is missing that it looks nothing like the theme I am using – I am using the Thesis Theme. Maybe I am expecting too much.
I understand asp.net but know nothing about php so I would be willing to pay someone to get this to work so that the test.php page looks like a typical post on my wordpress blog.
I would also be willing to pay a bit extra for someone to add a simple calculator to the test.php page. So for example 2 text boxes for numbers, a radio box with options (+, – , x , / ), and a button so that if you enter 2 numbers it calculate a result.
Im not sure how much to pay but I cant pay much.
Email me at postrocket@googlemail.com if anyones interested.
The forums it helps me a lot because I solve my problem regarding my wordpress theme and embed to my static page.
Thanks to your RobbyAnz!!!
Thanks,
This is a great article and a great website. I liked it very much. It will help me to optimise my websites in europe. I have website in travel and that meens a lot of seo work !!
Thanks a lot and greetings,
Kurt
Very cool! Also you can extend this approach. You can use a client which parses some WordPress blog and takes data from there. This is supported in the following Framework:
Vitche Emission PHP Framework is a non-commercial Open Source lightweight PHP Framework.
The key idea of that framework is to use central repository for keeping source code and providing all client software with an ability to do real-time source code updates. That makes the client free from the need to keeps the framework’s source code.
The following features are supported in the Emission Framework:
– ORM for database access;
– SOAP client;
– REST web service;
– SOAP-to-REST gateway web service;
– ICQ client;
– WordPress content client;
– SiteMap content client;
– Caching;
– GrossCommerce SOAP client;
– Some UI components.
The forums it helps me a lot because I solve my problem regarding my wordpress theme and embed to my static page.
Thanks to your RobbyAnz!!!
This is cool. If that worked for you, I am sure that it will also work perfectly on mine. Thanks for the idea.
[…] урока: http://www.problogdesign.com/wordpress/use-wordpress-as-a-php-framework-for-your-static-html-pages/ Facebook! Twitter it! Digg! […]
Superb, thanks. I’ve just spent the last few hours reading stuff about customising WordPress and this is by far the best advice I’ve read on getting started ‘hijacking’ wordpress functions. What I’m trying to do is isolate only the blogging and rss feed functions of wordpress- I already have a site that I have designed and coded from scratch so I am not interested in themes or layouts etc.
Many Thanks.
I am a newbie using WordPress, even if I’m working for a long time in this domain. I was just looking around this interesting blog and the best piece of news revealed to me: that I can embed wordpress engine in my old site.
Thanks a lot for it and best wishes from Romania.
hi,
You said that WordPress plugin can be included in your personal web pages,
if i want to include comment inbox plugin how i should do,i tried by pasting that php script and when i run it i am getting error.
Actually i want to implement posting comment option in my url using wordpress.please tell me how to implement it.
Googled for Frameworks and WordPress, got this site. Even though it wasn’t what I was looking for (I’m a developer doing basic research on extensible frameworks which exist for WP, to aid the advanced needs of some clients who want to “take it to the next level”) …
I would like to comment on a couple things I liked about your site- primarily the rollover on your logo as a home link. I have favored this approach since 1999, and believe it should be an expectation on a website- but I never thought to announce it like you have! (head reeling from solid hit with 2×4). I also like the leading graphic over this page. Good use of media.
One suggestion I’d make on this topic (& forgive me if someone highlighted it, because I haven’t read all comments) is the use of Super-Cache for WP. This feature will make WP much more robust when the hits start rolling in. Super Cache is a free plugin which provides true Static pages (also better for Google & other search indexing in a pure sense) instead of your host/server creating each page “on the fly” like building frankenstein each time a visitor requests a page. My statements are not the end of the discussion, but Super Cache can be very helpful for successful bloggers whose sites need a performance boost based on the number of hits they get.
[…] […]
[…] WordPress as a PHP Framework for Your Static HTML Pages problogdesign.com – by Michael Martin Use WordPress as a PHP Framework for Your Static HTML […]
Hi
I tried to use this beautiful include code with no success so far:
My WordPress is in a directory http://www.mysite.com/blog/
And I am trying to create a test file in my root http://www.mysite.com.
What should be the include path in this case?
Is this code supposed to work in my situation?
——————————————————-
…
——————————————————–
Sorry I used to do HTML for a decade but not familiar with PHP.
Appreciate your help.
Thanks this really helped me out today.
[…] Use WordPress as a PHP Framework for Your Static HTML Pages – A very interesting tutorial on how to use WP as a PHP framework. […]
This SO Rocks!
Thanks-the possibilities are endless!
Awesome tip.
I’m creating a web app with php but wanted to use wordpress themes.
Hi,
The templates work fine but the title of the pages says “Page not found”. Any workarounds?
Thanks
hello
i am trying this code in subdirectory in my blog but dosnot work.
I’m want to use wordpress tag in diffrent pages in sub directory such example list of post title of same category with date.
plz help me.
plz.
thanks
[…] Original Post […]
ei olha
[…] Use WordPress as a PHP Framework for Your Static HTML Pages (使用 WP 作为静态 HTML 页面的 PHP 框架) – 非常有趣的教程:怎样使用 WP 作为一个 PHP 框架。 […]
Never knew web designing was so simple :)
I was actually in the process of reinventing the wheel when I cam across this “Giant Wheel” in this page.
I just installed XAMPP and was about to begin exploration of PHP (I don’t know this language yet).
Thanks bud.
[…] Use WordPress as a PHP Framework for Your Static HTML Pages (使用 WP 作为静态 HTML 页面的 PHP 框架) – 非常有趣的教程:怎样使用 WP 作为一个 PHP 框架。 […]
[…] Use WordPress as a PHP Framework for Your Static HTML Pages (使用 WP 作为静态 HTML 页面的 PHP 框架) – 非常有趣的教程:怎样使用 WP 作为一个 PHP 框架。 […]
Thanks a lot… It helped me,, I’ll use it when needed.
There’s a bit, small problem, that is if we create dynamic page using wordpress, and static page manually by this technique, then the static page is loaded instead of the dynamic page created by wordpress.
[…] Use WordPress as a PHP Framework for Your Static HTML Pages– A very interesting tutorial on how to use WP as a PHP framework. […]
Hi, I am attempting to embed a php, rss website into a wp web site. What I have is a page called research that I would like to be the rss site, a complete php website that otherwise could be deployed on it’s own.
So from the home page or any other page on the wp site there would be a tab at top along the other wp website navigation tabs that reads “research” It would lead to this rss php site.
Brief explanation – the rss site is a product of a web site creation software I bought. So for discussion I am aware I could add rss feeds to my wp site but I have a reason for trying to blend two different websites. Any assistance in this project is most appreciated
regards Keith
[…] Use WordPress as a PHP Framework for Your Static HTML Pages (使用 WP 作为静态 HTML 页面的 PHP 框架) – 非常有趣的教程:怎样使用 WP 作为一个 PHP 框架。 […]
For some reason this isn’t working form me! I created a new test.php and copy the code to the file. Upload it to my root where is the wp-blog-header.php but nothig shows when i open mysite.com/test.php just blank page. Any solutions? Thanx
For some reason this isn’t working form me! I created a new test.php and copy the code to the file. Upload it to my root where is the wp-blog-header.php but nothing shows when i open my-site.com/test.php just blank page. Any solutions? Thanx
Im not sure, maybe im not creating file test.php correct. I did copy the code in the notepad and save it as UTF8 with test.php name and still a blank page on my browser.