0

My wordpress feeds post item looks following:

<item>
   <title>Taste Trail – Lima and Cusco’s Best Eats</title>
   <link>
   http://example.com/taste-trail-lima-and-cuscos-best-eats/</link>
   <comments>http://example.com/taste-trail-lima-and-cuscos-best-eats/#comments</comments>
   <pubDate>Tue, 16 Apr 2013 03:24:37 +0000</pubDate>
   <dc:creator>anzprod</dc:creator>
   <guid isPermaLink="false">http://example.com/?p=717</guid>
   <description>
      <![CDATA[Data]]>
   </description>
   <wfw:commentRss>
      http://example.com/taste-trail-lima-and-cuscos-best-eats/feed/
   </wfw:commentRss>
   <slash:comments>0</slash:comments>
</item>

I want to change the URL of the post to something like

http://example.com/#!view/taste-trail-lima-and-cuscos-best-eats

Please help me with how to do this!

Thanks

1

1 Answer 1

1

You could filter 'the_permalink_rss':

add_filter( 'the_permalink_rss', 'wpse_96602_change_feed_item_url' );

function wpse_96602_change_feed_item_url( $url )
{
    $parts = parse_url( $url );

    return $parts['scheme'] . '://' . $parts['host'] . '/#!view' . $parts['path'];
}

But … I strongly recommend not to do that. Hash-bangs will break your web site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.