<form action="<?php echo site_url() ?>/cart" method="post">
<?php
session_start();
$_SESSION['count'] = $count;
$_SESSION['timedata'] = $timedata;
$_SESSION['title'] = $title;
$_SESSION['price'] = get_field('price', $post_id);
$_SESSION['thumb'] = $thumb;
$_SESSION['post_id'] = $post_id;
?>
<input type="hidden" name="post_id" value="<?php the_ID(); ?>">
<input type="hidden" name="title" value="<? the_title($post_id); ?>">
<input type="hidden" name="price" value="<?php the_field('price', $post_id); ?>">
<input type="hidden" name="thumb" value="<?php
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true);
echo $thumb_url[0];
?>">
****
</form>
<?php echo $_POST['title']; ?>
[
['id'=>'someid', 'title' => 'someTitle', ....],
['id'=>'someid2', 'title' => 'someTitle2', ....],
['id'=>'someid3', 'title' => 'someTitle3', ....],
]
$items = $_SESSION['items'];
echo 'количество: '. count($items);
foreach($items as $one){
echo $one['title'];
}