Заказчикам часто бывает нужен различный функционал и я даже не знаю что гуглить.
для блогов
define( 'WP_POST_REVISIONS', 1 );
define('AUTOSAVE_INTERVAL', 180 ); // seconds (default is 60)
wp_enqueue_style( 'main_style', get_template_directory_uri() . '/css/styles.css' );
UPDATE wp_options SET option_value = REPLACE (option_value, 'http://old_domain.ru', 'https://new_domain.ru') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://old_domain.ru', 'https://new_domain.ru');
UPDATE wp_posts SET guid = REPLACE (guid, 'http://old_domain.ru', 'https://new_domain.ru');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://old_domain.ru','https://new_domain.ru');
и вставил ее на другую страницу шаблон.<?php echo do_shortcode("[gallery link="file" ids="2077,2088,2078,2079,2090,2099,2089,2092,2083,2081,2097,2098,2101,2084,2093,2094,2095,2096,2085,2086,1802,1803,1769,1774,1789,1790,1791,1806,1801,1800,1264,1804,1807,1808,1809"]"); ?>
И теперь страница не грузится. Что не так?
<?php echo do_shortcode('[gallery link="file" ids="2077,2088,2078,2079,2090,2099,2089,2092,2083,2081,2097,2098,2101,2084,2093,2094,2095,2096,2085,2086,1802,1803,1769,1774,1789,1790,1791,1806,1801,1800,1264,1804,1807,1808,1809"]'); ?>
function foo_theme_customize_register( WP_Customize_Manager $wp_customize ) {
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
'selector' => '.site-description',
'container_inclusive' => false,
'render_callback' => function() {
bloginfo( 'description' );
},
) );
}
add_action( 'customize_register', 'foo_theme_customize_register' );
add_action('customize_register', 'dco_customize_register');
function dco_customize_register($wp_customize) {
//FOOTER
$wp_customize->add_section('footer', array(
'title' => 'Подвал',
'priority' => 1,
));
//footer text
$setting_name = 'footer_text';
$wp_customize->add_setting($setting_name, array(
'default' => '',
'sanitize_callback' => 'sanitize_textarea_field',
'transport' => 'postMessage'
));
$wp_customize->add_control($setting_name, array(
'section' => 'footer',
'type' => 'textarea',
'label' => 'Текст в подвале',
));
$wp_customize->selective_refresh->add_partial($setting_name, array(
'selector' => '.footer-desc',
'render_callback' => function() use ($setting_name) {
return nl2br(get_theme_mod($setting_name));
}
));
}
<div class="footer-desc"><?php echo nl2br(get_theme_mod('footer_text')); ?></div>