• Alright I starting making a website yesterday and I wanted to have a number of pages instead of ‘older posts’ etc. I download and activate WP-PageNavi, look up a bunch of installation methods but none work.

    The one here is easy to follow but there is no code to follow. Also, I always get a red cross when I paste the code(<?php wp_pagenavi( array( ‘type’ => ‘multipart’ ) ); ?> or this code <?php wp_pagenavi(); ?>).

    The method is no use to my current theme (Sydney). The theme takes it from link-template.php but there is no code to replace. This is the code:

    function get_the_posts_navigation( $args = array() ) {
    $navigation = ”;

    // Don’t print empty markup if there’s only one page.
    if ( $GLOBALS[‘wp_query’]->max_num_pages > 1 ) {
    $args = wp_parse_args( $args, array(
    ‘prev_text’ => __( ‘Next page’ ),
    ‘next_text’ => __( ‘Previous page’ ),
    ‘screen_reader_text’ => __( ‘Page navigation’ ),
    ) );

    $next_link = get_previous_posts_link( $args[‘next_text’] );
    $prev_link = get_next_posts_link( $args[‘prev_text’] );

    if ( $prev_link ) {
    $navigation .= ‘<div class=”nav-previous”>’ . $prev_link . ‘</div>’;
    }

    if ( $next_link ) {
    $navigation .= ‘<div class=”nav-next”>’ . $next_link . ‘</div>’;
    }

    $navigation = _navigation_markup( $navigation, ‘posts-navigation’, $args[‘screen_reader_text’] );
    }

    return $navigation;
    }

    Any advice on a novice user?

  • The topic ‘[Plugin: WP-PageNavi] Plugin does not want to work, no idea where I should start’ is closed to new replies.