WordPress.org

Ready to get started?Download WordPress

Forums

JP's Get RSS Feed
[resolved] No longer see the feed (18 posts)

  1. riskiii
    Member
    Posted 1 year ago #

  2. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

  3. riskiii
    Member
    Posted 1 year ago #

    I have restored the previous version, as we are in production. I was getting nothing.

    thanks,
    Danny

  4. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Let me check it out and get back to you.

  5. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    I put this URL into the default URL setting on my site:

    http://mopac.peopleadmin.com/rss/615.xml

    If this is not the correct feed URL please advise. I am using plugin version 1.3.1 from the repo.

    On my homepage I used the shortcode [jp-rss-feed]. You can see the feed being pulled on my homepage: http://www.jimmyscode.com/

    I will leave the feed there for a while so you can see it.

    If it is still not working for you, can you explain in more detail how you are calling the plugin? Are you using the shortcode or PHP function, and how are you calling it? Post the code you are using.

  6. riskiii
    Member
    Posted 1 year ago #

    This is the code I used.

    <div class="job-openings">
    <?php 
    
      jp_get_rss_feed_items("https://mopac.peopleadmin.com/rss/615.xml", 100);
    
    ?>
    </div>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  7. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Version 1.3.1 introduced a new way of calling the PHP function. Sorry if that wasn't clear. Here is the text from the plugin page (http://wordpress.org/extend/plugins/jps-get-rss-feed/):

    Notice: Version 1.3.1 introduced admin menus for plugin settings. There is also a new way to pass parameters to the shortcode and PHP function. You should check all shortcodes and plugin function calls before and after upgrading, to confirm compatibility with this version.

    So you need to do something like this:

    if (function_exists('jp_get_rss_feed_items')) {
      jp_get_rss_feed_items(array(
        'url' => "https://mopac.peopleadmin.com/rss/615.xml",
        'numitems => 100,
        'nofollow => true,
        'show' => true
      ));
    }

    Try that and let me know if it works.

  8. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    My code is missing some closing quotes. It should be:

    if (function_exists('jp_get_rss_feed_items')) {
      jp_get_rss_feed_items(array(
        'url' => "https://mopac.peopleadmin.com/rss/615.xml",
        'numitems' => 100,
        'nofollow' => true,
        'show' => true
      ));
    }
  9. riskiii
    Member
    Posted 1 year ago #

    I tried that verbatim, and it did not work. This was in a php widget.

  10. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    I believe widgets need the return statement, not echo. So the code would have to be

    if (function_exists('jp_get_rss_feed_items')) {
      jp_get_rss_feed_items(array(
        'url' => "https://mopac.peopleadmin.com/rss/615.xml",
        'numitems' => 100,
        'nofollow' => true,
        'show' => false
      ));
    }

    or simply leave off the 'show' parameter for the default behavior which is to return the output:

    if (function_exists('jp_get_rss_feed_items')) {
      jp_get_rss_feed_items(array(
        'url' => "https://mopac.peopleadmin.com/rss/615.xml",
        'numitems' => 100,
        'nofollow' => true
      ));
    }
  11. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    If the code I posted still won't work, please let me know which PHP widget you are using. The documentation might explain how to format the PHP properly.

  12. riskiii
    Member
    Posted 1 year ago #

    I had forgotten to upgrade again before I did it. Let me try it again.

  13. riskiii
    Member
    Posted 1 year ago #

    The php plugin widget that I am using is by Otto, Executable PHP widget. I used the following code after upgrading:

    if (function_exists('jp_get_rss_feed_items')) {
      jp_get_rss_feed_items(array(
        'url' => "https://mopac.peopleadmin.com/rss/615.xml",
        'numitems' => 100,
        'nofollow' => true,
        'show' => false
      ));
    }

    I am sorry to say that it did not work.

  14. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Let's try to narrow down what is causing this problem.

    I used the shortcode on my site this morning and it displayed properly. I also just tested the PHP function in my functions.php, and it worked.

    So it has to be something with the way the widget works, or the way they work together. Unfortunately, it's possible that these two plugins no longer play nice together.

    I installed that plugin on my blog. I can't get even the most basic PHP to work with it. I tried

    <?php echo 'hey now'; ?>

    and it wouldn't display. I'll try it again when I'm home, but please confirm that it works with other text or PHP. I'll assume that when you wrote earlier you rolled back to the previous version of my plugin, you meant that you were using it with the same widget.

    Please try calling the function outside of the widget. That would confirm if it is the widget causing the problem.

  15. riskiii
    Member
    Posted 1 year ago #

    What is the shortcode you would use, I didn't see it in the readme.txt.

  16. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    It would be [jp-rss-feed], additional parameters are:

    url => '#' - the feed URL to parse.
    numitems => '5' - the number of items to fetch.
    nofollow => true - include rel="nofollow" after each link?
    cssclass => 'jpgetrssfeed' - CSS class to style the output

    These are the default values.

    So at minimum you would call it like this:

    [jp-rss-feed url="https://mopac.peopleadmin.com/rss/615.xml"]

  17. riskiii
    Member
    Posted 1 year ago #

    It works fine as a shortcode. However, I need to put it in a widget area, so I may have to try some other php plugins.

  18. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Great, so it has to be something about the way the widget parses the code in my plugin. You could try using the built-in text widget for this. Check out this tutorial:

    http://digwp.com/2010/03/shortcodes-in-widgets/

    Otherwise, if you do find another plugin combination that works, do let me know. Thanks for taking the time to report this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.