WordPress Plugin: Wp-easyarchives and monthly archive links

Source: Internet
Author: User

We recommend a WordPress archive plug-in: Wp-easyarchives.

WP-easyarchives displays a search engine-friendly tree structure archive list on the custom page. Unlike other archive plug-ins, the time and author filtering functions are added.

Installation Method:
1. decompress the compressed package to the {WordPress root directory}/WP-content/plugins/
2. log on to your WordPress background and go to the Plugins page to activate the plug-in WP-easyarchives.
3. append the following code to the appropriate location of the topic file:<?php wp_easyarchives(); ?>

Parameters used:
Name Type Description Default Value Supported versions
Limit Integer Display the number of archives per month (only valid for widgets) 6 1.0 or more
Mode Last/All/None Display Mode Last 1.0 or more
Page True/false Show page entries False 1.0 or more

You can use the preceding parameter to change the display mode of the latest comment, for example:
<? PHP wp_easyarchives ('mode = last & page = false');?> This is the latest article published in January. The page is not displayed)

Added question about the archive link:
Since my permanent link is/archives/Hangzhou post_id).html, the corresponding monthly archive address is:/archives/data/% year %/% monthnum % /. The plug-in's corresponding monthly archive address:/% year %/% monthnum % /.
Therefore, you need
$url = get_bloginfo('url') .'/' . $month_item->year . '/' . zeroise($month_item->month,2);
The code is changed:
$url = get_bloginfo('url') .'/'. 'archives' . '/'. 'date' . '/' .$month_item->year . '/' . zeroise($month_item->month,2);

Hope to help me meet friends with the same problems.

Link to the original article: WordPress plug-in recommendation: Wp-easyarchives and monthly archive links

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.