Forums

How to add feed to an existing website (6 posts)

  1. okjazz
    Member
    Posted 2 years ago #

    I succesfully created a blog.

    I would like to feed the posts from the blog into the existing index.html which is a non wordpress page.

    I have read wordpress help section. To no avail.

    Can someone give me some basic step by step instructions on how to feed the posts on the blog to the main index page ?

    Thanks in advance

  2. stvwlf
    Member
    Posted 2 years ago #

  3. okjazz
    Member
    Posted 2 years ago #

    Thanks for the post. Please help with the instruction below. I am not sure which php page they are referring to. Is this index.php, sidebar.php or ......

    Any help will be appreciated

    So here we go. First, load SimplePie by adding this line to the top of the PHP page you’ll be using it on:

    <?php
    include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/simplepie.inc';
    ?>

  4. okjazz
    Member
    Posted 2 years ago #

    Also where does the code below go >

    Once the above code is in place, we can start printing out the contents of the feed. First, we’ll probably want to display the title of the feed itself. For a WordPress-based site, this is the same as the blog name.

    <h1><?php print $feed->get_title(); ?></h1>

  5. stvwlf
    Member
    Posted 2 years ago #

    Hi

    They are not referring to anything to your WordPress blog at all. You are going to convert your existing standalone index.html page into one called index.php. Then you add the code in this article to the new index.php file. Does this help orient you?

    Make a copy of index.html and save it as index.php Then get index.php working, per the article. when you have it working you will be replacing index.html with index.php but in the meantime you can have them both in place.

    You will be redirecting all existing references to index.html to index.php, so no links will be broken by this shift.

    Does this help?

  6. okjazz
    Member
    Posted 2 years ago #

    Thanks a million !
    That was very helpful of you. With your help , I am getting it to work now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.