WordPress.org

Ready to get started?Download WordPress

Forums

Retrieving and splitting the accessing URL? (2 posts)

  1. CharlesKrause
    Member
    Posted 8 years ago #

    OK, I'm happily hacking away at putting breadcrumbs on my blog.

    Unfortunatly, breadcrumb plugins don't work with Ultimate Tag Warrior. If I follow a tag link, the breadcrumb plugin tell me I'm on the home page.

    I can use the is_tag() function to "fake" an addition to the breadcrumb. Bacially putting

    <?php if (is_tag()) echo '> <a href="/?page_id=85"> Tags</a> >'; ?>

    in the same <div> as the breadcumb plugin call. This means that if I click a tag term, I now see

    Home > Tags >

    with Home and Tsgs being links to the appropriate pages.

    However, I can't seem to find a funtion that pulls out the NAME of the tag which I just clicked on.

    It strikes me that it is just SITTING there in the URL - I can just pull out the URL, split it on '=' and presto tag term!

    However, I cannot find a funtion to access the URL either! bloginfo('url') retrieves the BASE URL stored in the WordPress DB.

    So - any ideas how I can access the name of the tag that got me to the page in the first place?

  2. tsguitar
    Member
    Posted 7 years ago #

    Stumbled across this one. UTW gives you a function to show the tag clicked on:
    <?php UTW_ShowCurrentTagSet("commalist") ?>

    More info: http://dev.wp-plugins.org/wiki/UltimateTagWarrior

Topic Closed

This topic has been closed to new replies.

About this Topic