I'm listing categories for a custom post type, which is going great so far.
The problem is when I get the category link, is linked to a default category archive template, and I'd like to link it to a custom-page-template. Is there a way to do that?
<?php
//Llamar al catálogo
$taxonomy = 'lookbook-category';
$orderby = 'date';
$post_type = 'post';
$args = array(
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'post_type' => $post_type,
);
?>
<?php
$categorias = get_categories($args);
// Mostrar categorías
foreach ($categorias as $cat) {
echo '<div class="temporadas-catalogo ">';
echo '<h1 class="">'.$cat->name.'</h1>';
echo '<p class="">'.$cat->description.'</p>';
echo '<div class="center margin-top">';
echo '<a class="button " href="'.get_category_link($cat).'">Ver Catálogo</a>';
echo '</div>';
echo '</div>';
}
?>