lundi 5 octobre 2015

Wordpress posts, link to category pages

Within this wordpress function:

function ct_post_nav() { ?>
        <ul>
           <li class="post-nav-all">
              <?php $linktitelposts = get_cat_ID( $cat_name );          
                 if ($linktitelposts == 'blogs' )
                 {$linktitelposts = '<a href="#">Lees alle blogs</a>';}
                 if ($linktitelposts == 'vacatures')
                 {$linktitelposts = '<a href="#">Lees alle vacatures</a>';}
             ?> 
           </li>
        </ul>
    </div><!-- .nav-links -->
</nav><!-- .navigation -->

I want a link back to the categorie pages inside the li. The php lines that are in there now are what I tried, but of course it does not work. Is there a way to get a link that changes per category?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire