• Resolved ladii-mystic

    (@ladii-mystic)


    Hey all,

    you know that Archives widget code is this:

    <?php wp_get_archives(‘type=postbypost&limit=10’); ?>

    So what is the RSS widget code??

    please and thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • You could try this:

    <?php wp_widget_rss_output('YOUR_FEED_URL'); ?>

    Look through wp-includes/default-widgets.php to see all of the RSS widget code.

    For example, here is the wp_widget_rss_output() function as it exists in version 2.8.3:
    https://core.trac.www.ads-software.com/browser/tags/2.8.3/wp-includes/default-widgets.php#L752

    Thread Starter ladii-mystic

    (@ladii-mystic)

    Thank you!

    That worked!

    But now, i have a question.

    $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 );
    	        $args = wp_parse_args( $args, $default_args );
    	        extract( $args, EXTR_SKIP );
    
    	        $items = (int) $items;
    	        if ( $items < 1 || 20 < $items )
    	                $items = 10;
    	        $show_summary  = (int) $show_summary;
    	        $show_author   = (int) $show_author;
    	        $show_date     = (int) $show_date;

    The code you gave me only shows the title of the threads, does the code above work to show the author and date?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    For that, you would pass it arguments.

    <?php wp_widget_rss_output('YOUR_FEED_URL', array(
    'show_author' => 1,
    'show_date' => 1,
    )); ?>
    Thread Starter ladii-mystic

    (@ladii-mystic)

    Thanks you both!

    And now there’s another question.
    *Sorry, I don’t really know anything about RSS

    With the codes you both provided, it only shows new thread titles?
    I even made a new thread, and waited five minutes or so, and it still doesn’t show up on the blog??

    Is there another code to show the new posts instead of the new threads?

    And to limit the amount of new threads/posts?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I have no idea what you mean by “threads” vs. “posts”, but the RSS reader in WordPress uses a caching system. So it won’t update for at least an hour after the last check, to avoid putting undue pressure on the other servers.

    Thread Starter ladii-mystic

    (@ladii-mystic)

    Oh alright =)

    Thank you ^_^

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘What is the RSS css code?’ is closed to new replies.