wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
previous_post [ WordPress Function ]
previous_post ( $format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '' )
| Parameter: |
|
| Siehe: | |
| Definiert in: |
|
Ähnliche Funktionen: previous_posts, get_previous_post, previous_post_link, previous_posts_link, get_previous_posts_link
Prints link to the previous post.
Source
<?php
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
_deprecated_function( __FUNCTION__, '2.0', 'previous_post_link()' );
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = get_previous_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
?>
Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- Function Reference/previous post « WordPress Codex
Used on single post/permalink pages, this tag lists the previous post in chronological order from the current post. It can work in conjuntion with the next_post() ...
codex.wordpress.org - Next and Previous Links « WordPress Codex
The Next and Previous post links guide your visitor through your WordPress site. ... and Next links, and the combination pair of previous_post() and next_post(), ...
codex.wordpress.org - Function Reference/previous post link « WordPress Codex
Description. Used on single post permalink pages, this template tag displays a link to the previous post which exists in chronological order from the current post.
codex.wordpress.org - WordPress › Support » Conditional previous_post and next_post
I would like to display a filler in the spot if there is no next post and/or previous post. So that when you click on the first link, there is a special "filler" div displaying ...
wordpress.org
Nutzerduskussionen [ wordpress.org ]
- bigskydj09 on "prev/next navigation for only one category?"
- JamesICT on "Adding a class WITHIN the previous_post function"
- alchymyth on "Adding a class WITHIN the previous_post function"
- JamesICT on "Adding a class WITHIN the previous_post function"
- alchymyth on "Adding a class WITHIN the previous_post function"
- JamesICT on "Adding a class WITHIN the previous_post function"
- Dummbatz on "Previous / Next Post navigation by Author"
- Dummbatz on "Previous / Next Post navigation by Author"
- Dummbatz on "Previous / Next Post navigation by Author"
- jpgnfx on "Previous / Next Post navigation by Author"