문제

I am having an issue with the product permalinks on a website I have been asked to fix.

website page where links are broken: http://fallenangelbakery.com/menu/cupcakes/

There is a product-types taxonomy created which gets to the above page ok. However, the links to the individual products do not work. When editing the products, the permalink and the shortlink dont work.

loop code in taxonomy-product-types.php

<div class="cw">
<div class="c">
        <div class="cs"></div>
        <h1><?= single_tag_title( '', false ) ?></h1>
        <div class="cds"><?= category_description()?></div> 
        <div class="full">
            <? if($wp_query->post_count < 8 && $wp_query->post_count > 4 || $wp_query->post_count == 3){
                    $class = 'medium';
                } else if($wp_query->post_count <= 4){
                    $class = 'large';
                } else {
                    $class = 'small';
                }
            ?>          
            <ul class="product-list <?=$class?>">
            <? while ( have_posts() ) : the_post(); ?>
            <li>
                <a href="<?= the_permalink(); ?>" title="<? the_title(); ?>">
                    <div class="frame top gb"></div>
                        <div class="frame right gb"></div>
                            <? the_post_thumbnail( 'fab-'.$class.'-image' ); ?>
                        <div class="frame bottom gb"></div>
                    <div class="frame left gb"></div>

                    <span class="title"><? the_title(); ?></span>
                </a>
            </li>
            <? endwhile; ?>
            </ul>
            <div class="divider category"><span class="stars gb"></span></div>
        </div>
</div>
<div class="cb gb"></div>

the taxonomy is associated with "products" and we get products and product types as menu items in the wp-admin

taxonomy: product-types label of taxonomy: products slug: menu query var: product-types singular name: product-type

in order to get to the single product i have created a file called taxonomy-product.php.

can anyone give an idea why the product permalink doesnt work at all... even when trying to preview the page in wp-admin

https://wordpress.org/plugins/ultimate-taxonomy-manager/

Many thanks in advance

도움이 되었습니까?

해결책

You should review this: http://codex.wordpress.org/Function_Reference/register_taxonomy

I believe this is a problem with the taxonomy not being public.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top