$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>shortcode - Content included from pagination|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

shortcode - Content included from pagination

matteradmin9PV0评论

I appreciate if someone can help me to explain why my post content shows below the pagination even though I echo the title only.

I call this code via shortcode.

INPUT:

// the query to set the posts per page to 3
$paged = (get_query_var('page')) ? get_query_var('page') : 1;
$args = array('posts_per_page' => 3, 'paged' => $paged );
query_posts($args); 

if ( have_posts() ) : 

    while (have_posts()) : the_post(); 

        echo "<h2><a href='".get_the_permalink()."'>".get_the_title()."</a></h2>";

    endwhile; 

    the_posts_pagination( array(
            'mid_size' => 2,
            'prev_text' => __( 'Previous page', 'findarch' ),
            'next_text' => __( 'Next page', 'findarch' ),
            'screen_reader_text'    => __('navigation','findarch')
            ) );

else : 
    echo "NOT FOUND.";
endif; 

wp_reset_postdata();

OUTPUT:

43e
Hello world!
navigation
Previous page 1 2 3 4 

asdasd

dsad

as

das

d

asd

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far