WordPress.org

Ready to get started?Download WordPress

Forums

Insert Blog feed into home page. (31 posts)

  1. GMeagle86
    Member
    Posted 9 years ago #

    Here is what I am trying to do, maybe some of you php/html experts can help me. I haven't been that successful with it so far.

    I want to use WP as a blog, but on the front page of my website, I want to use the feed as the "news" section on my front page, complete with all the links. The website is made up of CSS/HTML, There is one div in the middle section where I want it to go. It will be surrounded by my other links, and header around it.

    I hope someone can help me. Thanks.

  2. vkaryl
    Member
    Posted 9 years ago #

    Try CG-Feedread from David Chait. [Listed partway down the top section of the page as
    CG-PowerPack PHP & WordPress Scripts/Plugins....]

  3. GMeagle86
    Member
    Posted 9 years ago #

    Found it, I will try it and report back. Thanks for the quick reply.

  4. vkaryl
    Member
    Posted 9 years ago #

    I've used it and it works great. I actually haven't it set up right now, and what's there is the new version. Please let me know, because I'll be headed back that direction soon.... Thanks!

  5. GMeagle86
    Member
    Posted 9 years ago #

    I might, (most likely am) doing something wrong. I downloaded the program, followed the correct instructions to uploading it in the plugin's folder, went into WP and activated it. Then I added this code to my .shtml document:

    <?php
    $feedUrl = "http://news.com.com/2547-1040_3-0-5.xml";
    $feedOut = getSomeFeed($feedUrl, 4, false, "feed-cnetttech", '', 36, false);
    if ($feedOut)
    echo $feedOut;
    ?>

    I just left his default feed to see if it worked....and it did not. I'm not quite sure what I'm doing wrong. I inserted it in a div in my webpage's codeing.

    Any suggestions?
    Thanks.

  6. vkaryl
    Member
    Posted 9 years ago #

    Sorry to be slow - took me a while to find it, just installed a new hdd and moved stuff around the goddess's green acres....

    Put this where you want the feed to show:

    <?php
    $feedUrl = "http://yoursite.com/yourblogname/wp-rss2.php";
    $feedOut = getSomeFeed($feedUrl, 5, true, "feed-cache_yourfeedname", '', 36, false);
    if ($feedOut)
    echo $feedOut;
    ?>

    You have to put this line in the "head" section of your page:

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

    And mind you, that's for the "old" version.... but I did have it running under 1.5. It all depends on getting the variables set right.

    (I think, if you have more problems, that you could post on ChaitGear and David would probably help, or post here and he'll be along probably tomorrow....)

  7. InfoCynic
    Member
    Posted 9 years ago #

    If your web server isn't setup to parse .shtml for PHP code (I don't imagine that's a normal setting), you might try renaming your page from whatever.shtml to whatever.php (you could probably use symlinks or a META REFRESH if you have people who will have whatever.shtml bookmarked).

  8. michaelc
    Member
    Posted 9 years ago #

    If CG-Feedread isn't fullt updated yet, you might try aggrss:

    http://soderlind.no/archives/2004/11/08/aggrss-an-rss-aggregator/

    I'm using it on my 1.5 site and it's working great.

  9. davidchait
    Member
    Posted 9 years ago #

    Feedread has no dependency upon wordpress, so version changes don't make a difference. In fact, you can direct-include it yourself if you want, and skip pulling in all of wordpress. something like

    include("wp-content/plugins/cg-plugins/cg-feedread.php");

    assuming your base page is where the WP root is -- otherwise, adjust the path accordingly.

    I agree with InfoCynic -- you need to have PHP parsing enabled, or do your homepage as php.

    -d

  10. GMeagle86
    Member
    Posted 9 years ago #

    Thanks! I did have to rename my page to php, and do a few other tweaks, but it is now working.

    I was wondering if there is a way to edit the "style" or the "theme" of the feed? to get it to match up with my site's colors/style? Thanks!

  11. slobizman
    Member
    Posted 9 years ago #

    I found this thread searching for "feed" and would like to interject a question if I may.

    I'd like to set up in my sidebar a list of feeds that would be of interest to my readers. I'd like them to be able to click on a link for a feed, and then have that feed display into my main content area where my WP posts normally go.

    Can one of the mentioned products here to that for me? as being a newbie to WP and not much of a programmer, I'd like it to be as easy as possible.

    Also, is there any ethical problems with this? I'd think not since the syndicator has already chosen to offer the feed to the world and can just do excerpts if he chooses.

  12. Browserd
    Member
    Posted 9 years ago #

    Hi there GMeagle86.
    I think I've done something like that in http://www.browserd.com.
    Take a look. Only the blog part is from WP and it is running inside a ilayer.
    If I'm happy with it? No. I need to get a way of having access to search form, categories and archives and I dont know how to do it...
    But, the updated posts are working.

  13. davidchait
    Member
    Posted 9 years ago #

    ethical issues aside, it would take a bit of coding (and a new theme file for 'showing feed entries'), but it is certainly doable in theory. Note, that's WITHOUT being a reblogger, NOT pushing the feed 'posts' actually into wordpress/your blog... (which is 'good').

    GMeagle86:
    Yes, all of the output from Feedread is tagged with CSS class identifiers for customizing the look and feel. I usually start by recommending you just bring up the source from viewing one of the pages on your site, and find the Feedread output, and look at the div blocking and class names tagged onto the various pieces.

    You can also then see if something is 'off' with the encapsulating blocks, such that your default sidebar ul/li styles aren't at least applying.

    Yep, there's still work to be done there. ;)

    -d

  14. GMeagle86
    Member
    Posted 9 years ago #

    Thanks, I will try to update the CSS and get that looking right.

    Browserd: That is very simliar to what I am trying to do, except I'm not going to have it in a scroll box. And with the version of Feedread I am using, it seems to give me links to go to the blog.

  15. vkaryl
    Member
    Posted 9 years ago #

    When I used this before, I had it displaying in one column (the rightcol div) on my main page, and was stylistically the same as the rest of the page styling. I don't remember that it was complicated to do, but then I'm pretty comfortable with css and tweaks....

  16. GMeagle86
    Member
    Posted 9 years ago #

    Sorry for the delayed response.

    What file do I update the css in? I'm having problems locating that.

    Also, is there a possiblity of getting the Date/time the post was posted on, on my front page?

    Thanks.

  17. vkaryl
    Member
    Posted 9 years ago #

    You'll have to meld the css for your site into the styles.css for wp. Y'know.... let me go grab a backup of my site when it was setup like that. I'll put it in a temp folder somewhere and post back with a link. It would help us both if the "working prototype" was available I think.

  18. Pauls
    Member
    Posted 9 years ago #

    I've brought feeds into web pages numerous times using the method below:

    1. Download and set up CARP from http://www.geckotribe.com/rss/carp/docs/download.php

    2. Then, to allow regular .html or .shtml pages to run php just pop this into your .htaccess file and save it to your root directory on your hosting account.

    RemoveHandler .html .htm .shtml
    AddType application/x-httpd-php .php .htm .html .shtml

    You'll have to go through the CARP docs to find the right code to display your feed the way you want, but it's very flexible and can easily be styled with CSS.

    Paul

  19. GMeagle86
    Member
    Posted 9 years ago #

    vkaryl: were you able to find anything? Thanks. I just need some sort of example to follow, as I work best when I'm following examples. Thanks.

  20. vkaryl
    Member
    Posted 9 years ago #

    GMeagle86: yes, I just now dug around and found it! You can see it here. If you'd like to give me a contact email, I'll send you the actual index.php since the code doesn't show in a view source.

    One odd tweak was that in order for the feed to find stuff, I had to put "www" in, which isn't how I usually addy things....

  21. freshpolitics
    Member
    Posted 9 years ago #

    Is it possible to do this from various sources, and organize by date? And to make uniform their style?

  22. GMeagle86
    Member
    Posted 9 years ago #

    vkaryl: Thanks, you can send it to me an e-mail at eagle86 (@) sbcglobal (.) net .

  23. vkaryl
    Member
    Posted 9 years ago #

    'kay, will do.... had to go digging for this thread again.... I can't believe how fast they fly off the front page!

  24. ilovetheweb
    Member
    Posted 9 years ago #

    <?php
    $feedUrl = "http://www.MYDOMAINNAME.com/wp-rss.php";
    $feedOut = getSomeFeed($feedUrl, 5, true, "feed-cache_yourfeedname", '', 36, false);
    if ($feedOut)
    echo $feedOut;
    ?>

    What do I put in for yourfeedname?

    Is it wp-rss.php?

    The whole URL:
    http://www.MYDOMAINNAME.com/wp-rss.php

    Last, what does this do?

    I did a search on Google for put your feed into your website and I found this link.

    Will the code above put my blog feed at the end of my webpage?

  25. vkaryl
    Member
    Posted 9 years ago #

    "yourfeedname" is anything to differentiate your feed for this feedread from other feeds you have.

    All I used was the subdirectory name - it worked fine. If you have only one feedread, just use "feed_cache_feedread" - the "feedread" cache folder should already be there.

    The code puts the feed where it is. So on the site I used to have it on, I had 3 columns, and the feed (using the code above) was in the right column.

  26. aliasjanedoe
    Member
    Posted 9 years ago #


  27. davidchait
    Member
    Posted 9 years ago #

    Just found this thread, wanted to clear up the last question...

    "feed-cache_yourfeedname" can be ANYTHING... pretty much. It is the FILE NAME used to store the results of grabbing the feed on your web server. It is mostly used so that if you have multiple feeds, the cache file names will be unique. Also nice that you can then identify WHAT the files are! ;)

    So, you could call it "xyzzy", or "mydomain", or "myfeed", or anything else you want. It's a field for your use, just don't leave it blank!!

    -d

  28. josephbing
    Member
    Posted 9 years ago #

    Hi David,

    Is there a way to randomize the feed display or organize them by time? Right now it displays feeds in the order that they are listed in the $feeds array.

  29. denisesballs
    Member
    Posted 8 years ago #

    Pauls, i have carp working but all it shows is my blog name and description. I cannot find the way to make it show the entries. Any help? Thanks.

  30. denisesballs
    Member
    Posted 8 years ago #

    lol nevermind. wish i waitied 2 seconds to try what fixed it. thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic