문제

There are "your last posts" on the homepage.

Under normal circumstances, the page proceeds as follows: http://example.com/page/1 http://example.com/page/2 e.t.c

I want to change this link structure. For example, like http://example.com/image/1. So I want to replace the term "Page" with something else or delete it completely. How do we edit a Wordpress blog perma link?

도움이 되었습니까?

해결책

No need to change core files:

add_action( 'init', 'wpse316713_pagination_base_rewrite_rule' );
function wpse316713_pagination_base_rewrite_rule() {
    global $wp_rewrite;
    $wp_rewrite->pagination_base = 'image';
}

Go to permalink options page, and press save to flush the rewrite rules, changes should apply afterwards.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top