Hello everyone,

I've made a custom theme and I'm trying to get the primary links running. For some reason only the last link in the list is showing up. I've read all the postings and have tried the solutions but to no avail. Any suggestions would be greatly appreciated

Mike

Comments

Duplika’s picture

This is the code i use to add primary links to the themes. What's yours? Post it here so we can see what's wrong.

<?php if (is_array($primary_links)) : ?>
    <ul id="primarylink">
      <?php foreach ($primary_links as $link): ?>
      <li><?php print $link?></li>
      <?php endforeach; ?>
    </ul>
    <?php endif; ?>

--
Duplika

platypus media’s picture

Here is my code:

if (is_array($primary_links) && !empty($primary_links)):

    foreach ($primary_links as $link):
  • print phptemplate_wrap_links($link, 2);
  • endforeach;

endif;

platypus media’s picture

ok i'm not sure why the code didn't come out like yours did... I hope its ok for you to undrstand.

Mike

KarlKedrovsky’s picture

I just got done adding primary links to a new template and found that if you use the same url in all of the links only the last one shows up. When I started adding the "real" links everything started showing up.

lava102’s picture

I was having the same problem, thanks for finding the solution!