WordPress.org

Ready to get started?Download WordPress

Forums

incorporating posts/pages into an html website (8 posts)

  1. jbbrwcky
    Member
    Posted 6 years ago #

    Let's say I have a website, let's call it http://www.website.com/

    Then I have a blog, let's call it http://www.website.com/blog/ (installed there)

    How can I incorporate blog posts/pages, and any other useful wordpress tags such as archives/categories, into the html pages of the website?

  2. jbbrwcky
    Member
    Posted 6 years ago #

    No-one? I thought I had read somewhere that it's possible?

  3. kentfallman
    Member
    Posted 6 years ago #

    You cant include stuff into .html pages, it have to be .php

    You can can make a static wordpress page and show them and/or make your own function to pull the data from the database into your page.php

  4. SimonJ
    Member
    Posted 6 years ago #

    Even if you give your files the .php extension, the wordpress tags wont works on your http://www.website.com if wordpress is installed in http://www.website/blog.

    Because the wordpress functions will be stored in /blog/wp-include... So there is no way to use these functions on a section of your site where wordpress is not installed.

    I'm far from being a php/mySQL guru, but I fear there is no easy way to call these function anywhere else than /blog...

    S.

  5. kentfallman
    Member
    Posted 6 years ago #

    you can really easy show wordpress stuff on any other php page!

  6. moshu
    Member
    Posted 6 years ago #

    Actually... if your blog is at example.com/simonj/ folder
    and you want to use any of the WP functions in a file at the root folder - all you have to do is this:
    add to the top of the file from the root (e.g. example.com/index.php) this:

    <?php
    require('./simonj/wp-blog-header.php');
    ?>

    You can use any WP functions, template tags etc.

  7. SimonJ
    Member
    Posted 6 years ago #

    kewl kewl! :-)

    So I take that back... :-) There is a really easy way to do so!

    S.

  8. jbbrwcky
    Member
    Posted 6 years ago #

    Thanks moshu, and thanks gents (and gals if any). Much appreciated :)

Topic Closed

This topic has been closed to new replies.

About this Topic