Hallo,
ich hoffe, ich bin jetzt damit im richtigen Unterforum.
Ich versuche auf der Seite meines schwerbehinderten Sohnes die reine Anzeige seiner Blogeinträge zu integrieren.
Das klappt eigentlich auch besser, wie ich erwartet habe, aber ich bekomme es einfach nicht hin, nach der Anzeige der max. festgelegten Artikel zur nächsten Seite zu wechseln.
Die Option wird zwar angezeigt, funktioniert aber nicht.
Ich hoffe, ihr könnt mir helfen.
--> http://www.kekestraum.de/Blog.php
Ich füg einfach mal den aktuellen Code inklusive den auskommentierten Versuchen hier rein:
<?php
global $wp_query;
/*$test = array(
'base' => '%_%',
'format' => '?page=%#%',
'total' => 100,
'current' => 0,
'show_all' => False,
'end_size' => 1,
'mid_size' => 2,
'prev_next' => True,
'prev_text' => __('« Previous'),
'next_text' => __('Next »'),
'type' => 'plain',
'add_args' => False );*/
$big = 999999999; // need an unlikely integer
//require('./Blog/wp-blog-header.php');
define('WP_USE_THEMES', false);
require('./Blog/wp-load.php');
//$wp_query = new WP_Query('posts_per_page=5');
//$wp_query = query_posts('posts_per_page=5');
query_posts('posts_per_page=5');
//query_posts('showposts=2');
//query_posts();
//The Query
/*$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args=array(
'paged'=>$paged, //Pulls the paged function into the query
'posts_per_page'=>3, //Limits the amount of posts on each page
);
query_posts($args);*/
echo '----------------------------------------------------------------------------------------------------<br>';
while (have_posts()): the_post();
//while ($wp_query have_posts()): $wp_query->the_post();
?><p><h2 style="text-decoration: underline;" ><?php the_time('j. F Y'); ?> um <?php the_time(); ?> Uhr</p><??></h2>
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content(); ?>
</div>
<?
//echo '<p class="date">' . the_date() . '</p>';
//echo '<p class="time">' . the_time() . '</p>';
//echo '<h1 class="title"><b>' . the_title() . '</b></a></h1>';
/*?><p><h2 style="text-decoration: bold;" ><?php the_title?></p><??></h2><?*/
//echo '<h3 style="text-decoration: strong;"">' . the_title() . '</a></h3>';
/*echo '?><h1 style="text-decoration: underline;"><?' . the_title() . '?></a></h1><?';*/
//php the_title( '<h3>', '</h3>', 'true' );
//echo the_excerpt();
//echo the_content();
//echo the_time();
/*?><p>Veröffentlicht am <?php the_time('j.F.Y'); ?> um <?php the_time('g:i' ); ?> Uhr</p><?*/
echo '----------------------------------------------------------------------------------------------------<br>';
endwhile;
//echo paginate_links ();
//echo wp_link_pages();
/*echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => max_num_pages
) );*/
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
Alles anzeigen