My WordPress site needs to have a different RSS feed on every page. In the short-term, I need to find a way to output an RSS feed with category = "2" (which will later become a number from different pages). I'm relatively new to PHP though.
Is there a way to get a variable echo'd WITHIN an echo?
I've tried:
<?php
$category = '2';
echo do_shortcode('[rssfeed cat="$category"]');
?>
and
<?php
$category = '2';
echo do_shortcode('[rssfeed cat='echo "$category"']');
?>
... But obviously they don't work. Can anyone suggest a work-around? Thanks