Within your site you can turn any php page into a WordPress enabled page by adding
require_once(‘./blog/wp-blog-header.php’);
Once you’ve done that, you can reference posts, etc.. using WordPress tags just as if you were writing a template.
Hi mrmist, thanks for that, actually I already did that, but isn’t working, I’m not receiving a single bit of data, I tried with
`<?php
require_once(‘Blog/wp-blog-header.php’);
?>`
and
<?php
require_once('./Blog/wp-blog-header.php');
?>
it’s probably a path issue
./Blog/wp-blog-header.php
would indicate the same folder as the file you are creating.
try just
/Blog/wp-blog-header.php
and be sure that is at the top of your new file. Most sites are case-sensitive too, so be sure it’s Blog and not blog, or vice versus.
Hi myinstinctwaswrong, thanks a lot, yes, that might be one thing, the other question is, where can I take the tags in order to display at least the last 2 posts from the blog?
Thanks a lot
Arturo
my client installed a version of WP
Earn your money!!! Use the docs!!!!
./Blog/wp-blog-header.php
would indicate the same folder as the file you are creating.
try just
/Blog/wp-blog-header.php
I did provide a working sample piece of code based on the information I was given (IE wanting to load a wp header file from a subdirectory called Blog which is called from a file in the root). Of course /Blog would work in that scenerio too.
Note, though, that neither would actually result in anything, you’d still actually have to call the relevant functions to get blog-like output. My line just includes the file.
As whoami says, use the documentation to find out what to put to display various articles/links, or look at your existing WordPress templates for examples.