• extremesuper

    (@extremesuper)


    I know this question has probably been asked 1000 times on this support blog, but I must just be missing it. Here it goes,

    I have a website, which also has a WordPress blog setup on the same server, it works perfectly. On the website side (html) I would like to put up a display showing my recent postings of the blog.
    What is the easiest way to do this? Easiest?

    If anyone can help it would be tremendously appreciated.

    Thanks,
    Jim (www.eXtremeSuper.com)

Viewing 4 replies - 1 through 4 (of 4 total)
  • moshu

    (@moshu)

    On a html file it will be a PITA…
    Can you change/rename it to .php?

    kickass

    (@kickass)

    Put this at the very top of the html file (adjust path to point at your wordpress installation)–

    <?php
    require_once("wordpress/wp-blog-header.php");
    define('WP_USE_THEMES', false);
    ?>

    Then put this in your side column, where you want the most recent post titles to be listed–

    <?php wp_get_archives('type=postbypost&limit=5'); ?>

    You can change that 5 to however many post titles you want to show.

    Now, in your .htaccess file in the directory where the html file resides you put–

    AddType application/x-httpd-php htm html php
    AddHandler application/x-httpd-php .htm .html

    Voila!

    Annica

    (@annica)

    I had the same question as Moshu, so I tried the steps you outline but I get this message:

    Fatal error: Call to undefine\function wp_get_archives()

    Any idea what I nned to do is greatly appreciated.

    skulled

    (@skulled)

    If you are getting a undefined function it means, you blog files aren’t getting called for some reason.

    Where do you have this running and not working? Can you provide the link to it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Displaying my Blog on the html side of my website’ is closed to new replies.