Jump to content

SEO Breadcrumbs


angelcosta

Recommended Posts

For SEO and usability purposes (self linking should only be used with anchors), i need my breadcrumbs' last item not to be a link, so i removed its tags.

 

How it is now:

 

<a href=page.php>Support</a> > <a href=page.php>Page</a> > <a href=currentpage.php>current page</a>

 

How i want it to be:

 

<a href=page.php>Support</a> > <a href=page.php>Page</a> >current page

 

If you also want it, replace {$breadcrumbnav} with the code bellow:

 

{php}
         $nav = explode(" > ",$this->get_template_vars('breadcrumbnav'));	
         foreach ($nav as $links) {
           if(end($nav) == $links){ echo strip_tags($links);}
           else {echo $links." » ";}    
         }
{/php}

 

PS: the " »" stands for the double arrow (»), if you want you can replace it with any separator you wish.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated