plugin-icon

Adjacent Archive Links

제작자: Justin Watt·
Adds two new template tags to output previous and next links on date archive pages.
등급
5/5
버전
3.0
활성화된 설치 항목
10
최근 업데이트일
May 18, 2015

After activating the plugin, you will have two new template tags at your disposal:

<?php previous_archive_link( 'format', 'link' ); ?> <?php next_archive_link( 'format', 'link' ); ?>

They adapt their output depending on whether the date archive is a day, a month, or a year, and they will only output a link for an adjacent time period in which you have published posts. Both tags take two string parameters, format and link.

The format parameter defines what comes before and after the link. In it, %link will be replaced with whatever is declared in the link parameter below. previous_archive_link defaults to “&laquo; %link” and next_archive_link defaults to “%link &raquo;“.

The link parameter defines the link text. Both tags default to “%date“, the adjacent archive page’s localized date.

If you’re interested in contributing to the code behind this plugin, it’s also hosted on GitHub: https://github.com/justincwatt/wp-adjacent-archive-links

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 4.2.39
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.