hi i am using <?php next_post_link( '%link class="prev" ', '<span></span> Previous Article', FALSE, '27 and 18 and 19 and 20 and 21 and 14' ); ?>
and its output is <a href="http://example.com/adfasdfa-1/" rel="prev"><span></span> Next Article</a>
in this i want to remove rel="prev" and wants to add class=”prev”
You could hook the filter ‘next_post_link’. Your hook function is passed the output string from your next_post_link() function call. You can use basic string operations to alter it as needed. Whatever you return is directly echoed out to the user’s browser.