Hi there,
It’s a bit difficult to explain, but here it goes. I had a e-commerce website made with PRO outputting categories on top of the shop page, like so:
https://www.dropbox.com/s/3czn0jwkx2hx8qm/Screenshot%202021-08-09%20at%2011.51.57.png?dl=0
Anyhow, I needed to update the site, and unfortunately, this custom modification disappeared.
https://birdie-elektromosauto.hu/modellek/
The code I used was in:
/wp-content/themes/pro-child/framework/views/integrity/woocommerce.php
And the code itself was:
<?php // ============================================================================= // VIEWS/INTEGRITY/WOOCOMMERCE.PHP // ----------------------------------------------------------------------------- // WooCommerce page output for Integrity. // ============================================================================= get_header(); ?> <?php
$taxonomyName = "product_cat";
//This gets top layer terms only. This is done by setting parent to 0.
$parent_terms = get_terms($taxonomyName, array('parent' => 0, 'orderby' => 'slug', 'order' => 'asc', 'hide_empty' => false));
echo '<ul class="category">';
foreach ($parent_terms as $pterm) {
//show parent categories
$thumbnail_id = get_term_meta($pterm->term_id, 'thumbnail_id', true);
// get the image URL for parent category
$image = wp_get_attachment_url($thumbnail_id);
// print the IMG HTML for parent category
echo '<li class="categoryli">' . '<a href="' . get_term_link($pterm, $taxonomyName) . '">' . "<img src='{$image}' class='catcoverimg alt='' />" . '<br>' . $pterm->name . '</a></li>';
}
echo '</ul>';
?>
Can you tell me why this overwrite stopped working and maybe how I could fix it?