WordPress.org

Ready to get started?Download WordPress

Forums

How do I list RSS links beside my displayed categories (5 posts)

  1. jeff-here
    Member
    Posted 8 years ago #

    Trying with wp_list_cats using feed_img= or just feed=
    Want to offer rss subscription to specific categories instead of all.

    Is this possible?
    Thanks in advance!

  2. andymike
    Member
    Posted 8 years ago #

  3. mouseclone
    Member
    Posted 8 years ago #

    Well I did it with out the wp_list_cats. I still don't get the way that works yet and I may go back and do it that way but...

    $link = '<ahref="'.get_category_link($category->cat_ID).'" ';
    $rss = '<a href="'.get_category_link($category->cat_ID).'&feed=rss2" ';
    if ( $use_desc_for_title == 0 || empty($category->category_description) )
    $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name)) . '"';
    else
    $link .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description,$category)) . '"';
    $link .= '>';
    $link .= apply_filters('list_cats', $category->cat_name, $category).'</a> ';
    $rss .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description,$category)) . '"';
    $rss .= '>';
    $rss .= '<img src="http://mouseclone.com/blog/rss-icon/rss-12x12.gif"></a>';
    $link .= $rss;

    I used $rss to create mine and just copies a few bits of code and then joined the $rss to the end of $link with $link .= $rss

    Hope this helps some. maybe i will do it right next time. or maybe not right just what is given to me.

    and edit the wp-includes/template-functions-category.php file.

    visit website for a look see.

  4. moshu
    Member
    Posted 8 years ago #

    That's way over-complicated compared to the solution offered in the Codex at the link above (and you don't have to touch any core files...)

    <?php wp_list_cats('sort_column=name&optioncount=0&feed=RSS'); ?>

  5. mouseclone
    Member
    Posted 8 years ago #

    so where would you use the wp_list_cats?? in the sidebar php from the themes directory? never mind just read some more... guess it helps to read.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.