<?php
$user_id = get_current_user_id();
$user_comments = get_comments(array(
'number' => -1,
'status' => 'approve',
'user_id' => $user_id
)); ?>
<ul>
<?php
foreach($user_comments as $user_comment){
echo '<li><a href="' . get_comment_link($user_comment) . '" target="_blank">' . get_the_title($user_comment->comment_post_ID) . '</a><p>' . $user_comment->comment_content . '</p></li>';
}
?>
</ul>
$(".woocommerce").on("change input", ".quantity .qty", function() {
var add_to_cart_button = $(this).parents( ".catalog-item" ).find(".add_to_cart_button");
add_to_cart_button.data("quantity", $(this).val());
add_to_cart_button.attr("href", "?add-to-cart=" + add_to_cart_button.attr("data-product_id") + "&quantity=" + $(this).val());
add_to_cart_button.attr("data-quantity", $(this).val());
});
$product = wc_get_product(get_the_ID());
$id = $product->get_id();
$sku = $product->get_sku();
<a href="?add-to-cart=<?php echo $id; ?>" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="<?php echo $id; ?>" data-product_sku="<?php echo $sku; ?>"></a>
<?php
$page_children = new WP_Query( array(
'post_type' => 'page',
'post_parent' => get_the_ID() // id текущей
));
if($page_children->have_posts()) {
while($page_children->have_posts()){
$page_children->the_post();
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<?php }
}
wp_reset_query();
?>