You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
cosmopet-architecture/wp-content/themes/cosmopet/woocommerce/archive-product.php

40 lines
1.1 KiB

<?php
// function get_blog_posts_data() {
// // $args = array(
// // 'post_type' => 'post',
// // 'posts_per_page' => 6,
// // );
// // $posts = new WP_Query($args);
// $formatted_posts = array();
// if (have_posts()) {
// while (have_posts()) {
// the_post();
// $formatted_post = array(
// 'title' => get_the_title(),
// 'link' => get_permalink(),
// 'excerpt' => get_the_excerpt(),
// 'thumbnail' => has_post_thumbnail()
// ? get_the_post_thumbnail_url(get_the_ID(), 'full')
// : get_template_directory_uri() . "/static/front-page/img/blog_card-img.jpg"
// );
// $formatted_posts[] = $formatted_post;
// }
// wp_reset_postdata();
// }
// return $formatted_posts;
// }
$context = Timber::get_context();
$context['posts'] = Timber::get_posts();
Timber::render('archive-product/archive-product.twig', $context);
?>