• Resolved cowpie

    (@cowpie)


    Before I explain the technical problems, let me explain what I want to do first. I set up wordpress without problems. I also have a website I am creating. I want to display my wordpress blog entries on the website I created. The only way I can think to do something like this is to read the rss file.

    As a result, I tried using carp and that didn’t work. After that I tried CG Feedread and that didn’t work either. For each, I could read feed from other rss feeds, but not my own blog. It is getting extremely frustrating. The code I am using for feedread:

    in the head section:
    <?php require(‘https://[mydomain].com/blog/wp-blog-header.php&#8217;); ?>

    where I want the feed to display:
    <?php
    $feedUrl = “https://www.[mydomain].com/blog/wp-rss2.php&#8221;;
    $feedOut = getSomeFeed($feedUrl, 4, false, “feed-realfeed”, ”, 36, false);
    if ($feedOut)
    echo $feedOut;
    ?>

    I can access the rss feed when I type it in the browser so I know it is there. Does anyone have a clue ?

Viewing 15 replies - 1 through 15 (of 30 total)
  • Not without a link to your blog, especially since you say other site feeds work just fine.

    As Beel said, not without a link to your feed. Generally, it’s a problem with the feed itself — try using one of the feed validators to look at it. The browsers will display improper feeds in lots of cases… But many of the aggregators and rebloggers will fail as they use more fine-tuned code that assumes the format is correct, rather than assuming the format might be potentially faulty. ??

    -d

    Thread Starter cowpie

    (@cowpie)

    the url for the feed is: https://www.realivy.com/blog/wp-rss2.php ; for the blog itself realivy.com/blog

    I tested that link and it works fine using CG-Feedread
    <?php getSomeFeed(‘https://www.realivy.com/blog/wp-rss2.php&#8217;, 4, true, “TEST”, ”, ”, ”, false, true, false); ?>

    Thread Starter cowpie

    (@cowpie)

    What should I have in my head section of the page? I think that might be my problem. When I have nothing and when I use the code that Beel just posted, I get this error

    “Fatal error: Call to undefined function: getsomefeed() …”

    I thought you said you had this working for other feeds? You need to have CG-Feedread activated and in the head something like:

    <?php require_once(‘/path-to/wp-config.php’); ?>

    (or to cg-feedread.php)

    I don’t think you can include php using http (someone correct me if I am wrong).

    Thread Starter cowpie

    (@cowpie)

    Beel, I apologize for being such a newbie with all of this. I immagine I am frustrating you with my questions. However, I receive this when Ihave the above command”

    Fatal error: main(): Failed opening required ‘/blog/wp-content/plugins/cg-plugins/cg-feedread.php’ (include_path=’.:/usr/local/lib/php’) in

    When I try using the whole path like /www/htdocs etc it still doesn’t work.

    You need to use the full path on your server if you start with a “/” – which might mean “/home/sitename/public_html/…”

    You might be able to use a relative link to the file, depending on where you are calling it from.

    I have such a bad memory and switching from one host to another, plus hosting a page off my computer on a Windoze box causes me to forget just what the full path may be so I sometimes throw a <?php echo dirname(__FILE__); ?> in the page I am working on.

    Thread Starter cowpie

    (@cowpie)

    <?php require_once(‘/www/r/realivycom/htdocs/blog/wp-config.php’); ?>
    <?php require_once(‘/www/r/realivycom/htdocs/blog/wp-content/plugins/cg-plugins/cg-feedread.php’); ?>

    I put those in my head section and when trying to load the page I get a 500 internal server error. I installed feedread properly. I’m not sure if this matters, but there was a cgfeeds.php file in an extras folder in the unzipped download. I didn’t konw where to put it, so I didn’t put it anywhere, since I figured it was an extra.

    Use just the cg-feedread one and descrobe the error, if any.

    Thread Starter cowpie

    (@cowpie)

    the page just tries to load and load and nothing happens, see for yourself:
    https://www.realivy.com/index2.php

    Interesting. Well, since the page is in the root directory, use a relative path to cg-feedread.

    <?php require_once(‘blog/wp-content/…’); ?>

    if that doesn’t work, post your index2 in pastebin.com

    Thread Starter cowpie

    (@cowpie)

    https://pastebin.com/396767

    Doh! The function returns the feed so you have to echo it (I was using it in conjunction with CG-QuickPHP in a page which echoes the result). Sorry about that ??

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘CG feed read not working’ is closed to new replies.