Forums

WordPress Passing Categories in posts (2 posts)

  1. tomuptonuk
    Member
    Posted 3 years ago #

    Hi all,

    Im hoping someone can help me here as its been driving me up the wall the last 2 days!

    Ok here is my example in which im hoping someone can point me in the right direction - http://lifted-radio.co.uk/podcasts/?p=26

    You will notice there is an RSS feed icon for this post. The idea is when someone clicks that icon Itunes will open so that specific person can subscribe to that specific Podcasts/RSS.

    The situation is, each artisit is going to have their own specific feed so people can subscribe to that specific person.

    Im having kittens here trying to sort this out so it works!

    Currently its displaying all feeds like this - itpc://lifted-radio.co.uk/podcasts/?cat=&feed=rss2 as you can see the CAT is blank.

    Here is where things get confusing. If you visit this page - http://lifted-radio.co.uk/podcasts/?cat=16 - The CAT is appearing. Im using the below code, can someone make a suggestion.

    Thanks in advance.
    Regards
    Tom

    <?php$url = get_category_link($cat) . "&feed=rss2";$url = str_replace("http", "itpc", $url); ?><div class="topPost"> <h2 class="topTitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <p class="topMeta">by <?php the_author_posts_link(); ?> on <?php the_time('M.d, Y') ?>,<br />Under: <?php the_category(', '); ?> <br /><br /></p[b]><a href="<?php echo $url;?>" target="_rss"> <img src="<?php bloginfo('template_directory'); ?>/images/rsstodj.gif"/>[/b]</a></p> <div class="topContent"><?php the_content('(continue reading...)'); ?></div> <span class="topTags"><?php the_tags('<em>:</em>', ', ', ''); ?></span><div class="cleared"></div>

  2. scribu
    Member
    Posted 3 years ago #

    Try using my plugin: Extra Feed Links

    It has a template tag that can be used to display a RSS icon.

    BTW, if you want anyone to look at your code, put it on pastebin.ca

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags