Add a link to current page feed in wordpress page templates
Posted on 2014-09-20
I need to manually add RSS feed links to some posts and pages on a wordpress site. I need these to be for the feeds for the individual post/category pages etc.
I know that adding /feed onto the url works to give the specific feed for that page.
Is there a wordpress function for current page url? I can't find one.
I want to add a link that would be something like this (obviously I've just put CURRENT_PAGE_URL for illustration) :
<li class="rssNav"><a title="RSS Feed" href="<?php echo get_CURRENT_PAGE_URL(); ?>feed/"><span>RSS Feed</span></a></li>
What's the best way to do this please?
ps. I tried just having href="/feed" but this just shows the home page feed - domain.com/feed