get_month_link [ WordPress Function ]
get_month_link ( $year, $month )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_comment_link, get_tag_link, get_comments_link, get_author_link, get_term_link
Retrieve the permalink for the month archives with year.
Source
<?php
function get_month_link($year, $month) {
global $wp_rewrite;
if ( !$year )
$year = gmdate('Y', current_time('timestamp'));
if ( !$month )
$month = gmdate('m', current_time('timestamp'));
$monthlink = $wp_rewrite->get_month_permastruct();
if ( !empty($monthlink) ) {
$monthlink = str_replace('%year%', $year, $monthlink);
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
return apply_filters('month_link', home_url( user_trailingslashit($monthlink, 'month') ), $year, $month);
} else {
return apply_filters('month_link', home_url( '?m=' . $year . zeroise($month, 2) ), $year, $month);
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get month link « WordPress Codex
Description. Returns the monthly archive URL to a specific year and month for use in PHP. It does NOT display the URL. If year and month parameters are set to ...
codex.wordpress.org - WordPress › Support » get_month_link
This doesn't seem to work. I want to be able to have the months where articles have been posted displayed as a list and as a link to articles that were written in ...
wordpress.org - get_month_link - Triphp Webmaster Blog
Code. <?php get_month_link('year', 'month'); ?> If no year or month paremeters are specified, the archive for the current month will be retrieved.
blog.triphp.com - get_month_link (WordPress Function) - WPSeek.com
WordPress lookup for get_month_link, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com
Gebruikersdiscussies [ wordpress.org ]
- doodlebee on "get_month_link() question"
- Otto on "get_month_link() question"
- doodlebee on "get_month_link() question"
- doodlebee on "get_month_link() question"
- doodlebee on "get_month_link() question"
- Otto on "get_month_link() question"
- doodlebee on "get_month_link() question"
- RogerUsh on "Problem with get_month_link"
- Kafkaesqui on "Problem with get_month_link"
- RogerUsh on "Problem with get_month_link"