Those parameters are only meant to be used on entries within Structure sections. (Just updated the docs to make that more clear.)
If you want to get the next/previous entries within a Channel section, you can use EntryModel::getNext() and getPrev().
There’s a bit of a trick with those functions though, because “next” and “previous” are ambiguous. (Only consider the entries in a specific channel? Or just the ones with a specific custom field value? etc.) So you need to pass element criteria params into those functions to establish what the full order of entries is.
In your case, sounds like you want the next/previous entries within your news
section. I’ll assume you want those entries to be listed by Post Date in descending order (so the latest stories are shown first), and the “Next” entry in this case would be whatever story came before the current one; and the “Previous” story would be whatever came later. (If my assumption is wrong, just change desc
to asc
in the order
param.)
{% set newsCriteria = craft.entries.section('news').order('postDate desc') %}
{% set prevEntry = entry.getPrev(newsCriteria) %}
{% set nextEntry = entry.getNext(newsCriteria) %}
{% if prevEntry %}
<a href="{{ prevEntry.url }}" class="prev">{{ prevEntry.title }}</a>
{% endif %}
{% if nextEntry %}
<a href="{{ nextEntry.url }}" class="next">{{ nextEntry.title }}</a>
{% endif %}