-
-
Save seredniy/f921d69b4f485ad6652898096740218a to your computer and use it in GitHub Desktop.
Имитирует функционал "Отображать на статической странице список записей".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'request', function ( $query_vars ) { | |
if ( isset( $query_vars['pagename'] ) && $query_vars['pagename'] === 'all-articles' ) { | |
add_filter( "pre_option_page_for_posts", function () { | |
return 484; // ID нужной страницы | |
} ); | |
} | |
return $query_vars; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment