• Resolved milo2man

    (@milo2man)


    Thanks for this great plugin.

    I’ve got

    <?php if(function_exists('tdotf_cat_tag_cloud')) {
    tdotf_cat_tag_cloud('cat=42&smallest=100&largest=100&unit=%number=0&format=list');
    }
    ?>

    in my sidebar and it works great.

    For the tag “sketching” in the category “news” it generates the link:
    http://localhost/blog/index.php/category/news/?cattag=sketching

    However

    <php tdotf_the_tags('Tags: ', ', ', ' | '); ?>

    is not working in the post metadata.

    It generates the link
    http://localhost/blog/index.php/category/?cattag=sketching
    which returns a 404.

    The category name: /news/ seems to be missing in the URL. How can I get the function tdotf_the_tags to also write the category name in the URL?

    I don’t know how to work with the wp_rewrite function. Can anyone help add the category name to the URL (just like the ‘tdotf_cat_tag_cloud’ does)? Many thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter milo2man

    (@milo2man)

    Problem solved. There was a problem with the tdotf_the_tags when used on category pages. Thanks to this post I was able to solve the problem.

    In the tdotf.php file, I replaced the code beginning on line 399:

    function tdotf_the_tags( $before = '', $sep = '', $after = '' ) {
      global $tdotf_tag_get_var,$cat;
      if(is_category() && isset($tdotf_tag_get_var)) {
        $tags = get_the_tags();

    with the following:

    function tdotf_the_tags( $before = '', $sep = '', $after = '' ) {
      global $tdotf_tag_get_var,$cat;
      if ( ! $cat ) {
        $category = get_the_category();
        $cat = $category[0]->cat_ID;
      }
      if(isset($cat) && isset($tdotf_tag_get_var)) {
        $tags = get_the_tags();

    and this did the trick. One thing to note is that tdotf_the_tags was misspelled in the original file (as tdof_the_tags). I suppose either spelling would work, but I changed it to tdotf_the_tags for consistency.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: TDO Tag Fixes] How to use wp_rewrite to include category in URL **fix’ is closed to new replies.