Hey
also ich wollte den folgenden code mit der Pagebar ersetzen und auch das ich die formatierung beibehalte...
PHP
function art_page_navi($title = '', $comment = false) {
$prev_link = null;
$next_link = null;
if($comment){
$prev_link = get_previous_comments_link(__('Newer Entries »', THEME_NS));
$next_link = get_next_comments_link(__('« Older Entries', THEME_NS));
} elseif (is_single() || is_page()) {
$next_link = get_previous_post_link('« %link');
$prev_link = get_next_post_link('%link »');
} else {
$prev_link = get_previous_posts_link(__('Newer Entries »', THEME_NS));
$next_link = get_next_posts_link(__('« Older Entries', THEME_NS));
}
$content = '';
if ($prev_link || $next_link) {
$content = art_parse_template("pagination",
array(
'next_link' => $next_link,
'prev_link' => $prev_link
));
}
if (!$content && !$title) return;
art_post_box($title, $content);
}
if (!function_exists('get_previous_comments_link')) {
function get_previous_comments_link($label)
{
ob_start();
previous_comments_link($label);
return ob_get_clean();
}
}
if (!function_exists('get_next_comments_link')) {
function get_next_comments_link($label)
{
ob_start();
next_comments_link($label);
return ob_get_clean();
}
}
if (!function_exists('get_previous_posts_link')) {
function get_previous_posts_link($label)
{
ob_start();
previous_posts_link($label);
return ob_get_clean();
}
}
if (!function_exists('get_next_posts_link')) {
function get_next_posts_link($label)
{
ob_start();
next_posts_link($label);
return ob_get_clean();
}
}
if (!function_exists('get_previous_post_link')) {
function get_previous_post_link($label)
{
ob_start();
previous_post_link($label);
return ob_get_clean();
}
}
if (!function_exists('get_next_post_link')) {
function get_next_post_link($label)
{
ob_start();
next_post_link($label);
return ob_get_clean();
}
}
Alles anzeigen