post in archive: different template than normal post?
-
Hi,
I’d like to list the 15 latest posts on a “news” page and list all older posts with an offset of 15 on my archive page.
on the news page, i have a link to the archive, in the archive i use page-navi for my postbypost-like archive, which i get with query_posts, due to the offset needed.this works fine, although i use wp-pagenavi for the archive, which doesn’t seem to support the offset correctly, as it just ignores it.
the problem is, when i visit a post from the news page, i want to keep the link at the bottom to the archive, but when i visit a post which is listed in the archive, i want to keep the pagenavi and the currently listed posts.
however, these behave completely the same way for me, which results in browsing the archive is a pain because i always get send to the same 15 posts and the “archive” link, that is shown on the news page.now for the question:
is it possible to distinguish if i visited the post which is in the archive or if i visited a post which is on the news page?
maybe by checking if i am in the 15 latest posts or something like that?
i also tried using is_archive, but it always returned false in my testcases.i haven’t been using wordpress for long, so i’m a bit stuck.
would be great, if you could help me.thanks in advance,
Björn
The topic ‘post in archive: different template than normal post?’ is closed to new replies.