$post_id = wp_insert_post( $post_information );
if ( isset( $_POST['elements'] ) ) {
$images = $_POST['elements'];
$images = explode( ',', $images );
update_post_meta( $post_id, '_user_images', serialize( $images ) );
}
url: 'http://site.ru/wp-admin/admin-ajax.php',
global $wpdb;
$user = get_userdata( $comment->user_id );
$user_id = $user->ID;
$comment_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) AS total FROM $wpdb->comments WHERE comment_approved = 1 AND user_id = %s", $user_id ) );
echo $comment_count;
remove_theme_support( 'wc-product-gallery-zoom' );
remove_theme_support( 'wc-product-gallery-lightbox' );
remove_theme_support( 'wc-product-gallery-slider' );
foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' ) as $filter ) {
remove_filter( $filter, 'wp_filter_kses' );
}
<a href="<?php echo home_url( '/blog/' ); ?>">Ссылка</a>
wp_nav_menu( array(
'theme_location' => 'header_menu',
'menu_id' => 'header-menu',
'container' => '',
'menu_class' => 'sf-menu',
) );