add_action('customize_register', function($customizer){
$customizer->add_section(
'theme_settings',
array(
'title' => 'Theme Settings',
'priority' => 35,
)
);
$customizer->add_setting('img-upload1');
$customizer->add_control(
new WP_Customize_Image_Control(
$customizer,
'img-upload1',
array(
'label' => 'Загрузка маленького логотипа',
'section' => 'theme_settings'
)
)
);
$customizer->add_setting('img-upload2');
$customizer->add_control(
new WP_Customize_Image_Control(
$customizer,
'img-upload2',
array(
'label' => 'Загрузка большого логотипа',
'section' => 'theme_settings'
)
)
);
По этому точно не ошибка в коде.
<?php
$queried_object = get_queried_object();
$taxonomy = $queried_object->taxonomy;
$term_id = $queried_object->term_id;
?>
<?php if( have_rows('model-wrp', $taxonomy . '_' . $term_id) ): ?>
<?php while( have_rows('model-wrp', $taxonomy . '_' . $term_id) ): the_row();
// vars
$modelPassport = get_sub_field('model-passport');
$modelRecomendation = get_sub_field('model-recomendation');
$modelPreview = get_sub_field('model-preview');
?>
<div class="series__item-links">
<?php if( $modelPassport ): ?>
<a href="<?php echo $modelPassport; ?>">Ссылка №1</a>
<?php endif; ?>
<?php if( $modelRecomendation ): ?>
<a href="<?php echo $modelRecomendation; ?>">Ссылка №2</a>
<?php endif; ?>
<?php if( $modelPreview ): ?>
<a href="<?php echo $modelPreview; ?>">Ссылка №3</a>
<?php endif; ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
<body>
.<div>
. function wpdocs_theme_name_scripts() {
wp_enqueue_style( 'hover', get_template_directory_uri() . '/css/hover.css' );
//или если не хочется загружать файл к себе:
wp_enqueue_style( 'hover', '//cdnjs.cloudflare.com/ajax/libs/hover.css/2.1.0/css/hover-min.css' );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );
add_action( 'widgets_init', 'dco_change_sidebar_tag', 11 );
function dco_change_sidebar_tag() {
unregister_sidebar( 'colormag_right_sidebar' );
register_sidebar( array(
'name' => esc_html__( 'Right Sidebar', 'colormag' ),
'id' => 'colormag_right_sidebar',
'description' => esc_html__( 'Shows widgets at Right side.', 'colormag' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s clearfix">',
'after_widget' => '</aside>',
'before_title' => '<div class="widget-title"><span>',
'after_title' => '</span></div>'
) );
}
add_action('register_sidebar', 'dco_register_sidebar');
function dco_register_sidebar($sidebar) {
global $wp_registered_sidebars;
$sidebar['before_title'] = '<div class="widget-title"><span>';
$sidebar['after_title'] = '</span></div>';
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
}
$myposts = get_posts( array( 'category__and' => array( 2, 6 ) ) );
if($myposts) {
$post = $myposts[0];
setup_postdata($post);
the_title();
the_content();
wp_reset_query();
}
$myposts = get_posts( array( 'category__and' => array( 2, 6 ), 'posts_per_page' => '10' ) );
if($myposts) {
foreach ($myposts as $post) {
setup_postdata($post);
the_title();
the_content();
}
wp_reset_query();
}