Title: Something wrong in the TimberTerm.get_link() function
Last modified: August 21, 2016

---

# Something wrong in the TimberTerm.get_link() function

 *  Resolved [Donghyeok Kang](https://wordpress.org/support/users/wolfkang/)
 * (@wolfkang)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/)
 * Hi.
 * I have been using Timber since version 0.12.0.
 * I think there’s someting wrong in the TimberTerm.get_link() function.
 * It’s in the timber-library/functions/timber-term.php.
 * I replace it with
 *     ```
       function get_link() {
       		//return $this->get_path();
       		return get_term_link($this);
       	}
       ```
   
 * Please check it out.
    Thanks in advance.
 * [http://wordpress.org/plugins/timber-library/](http://wordpress.org/plugins/timber-library/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156917)
 * Hey wolfkang,
 * Thanks for the heads-up (glad you’ve been using!) I’ll take a look at this first-
   thing tomorrow and see what’s going on.
 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156939)
 * So it’s working for me without the change you show above. Can you show me how
   you’re calling the .get_link method from within your Twig template?
 *  Thread Starter [Donghyeok Kang](https://wordpress.org/support/users/wolfkang/)
 * (@wolfkang)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156954)
 * I think it makes trouble with a custom taxonomy.
 * This is my code.
 *     ```
       $args = array(
         'labels' => $labels,
         'public' => true,
         'show_in_nav_menus' => true,
         'show_ui' => true,
         'show_tagcloud' => false,
         'hierarchical' => true,
         'rewrite' => array('slug' => 'book-category', 'with_front' => false),
         'query_var' => true
         );
         register_taxonomy( 'dillybooks_category', array('dillybooks_book'), $args );
       ```
   
 * I set the rewrite rule using the slug, ‘book-category’.
    But {{category.link}}
   doesn’t include ‘book-category’ but ‘dillybooks_category’. For example, it makes
   a url like [http://books.dillypress.com/blog/dillybooks_category/intermediate](http://books.dillypress.com/blog/dillybooks_category/intermediate)
   not [http://books.dillypress.com/book-category/intermediate/](http://books.dillypress.com/book-category/intermediate/).
   The page, [http://books.dillypress.com/blog/dillybooks_category/intermediate](http://books.dillypress.com/blog/dillybooks_category/intermediate)
   returns 404 not found.
 * Please test and fix it.
    Thanks.
 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156958)
 * That makes sense. I was able to replicate the problem on my side and then apply
   your suggested fix. You can download the updated code on GitHub:
 * [https://github.com/jarednova/timber](https://github.com/jarednova/timber)
 * … let me know if it works for you and I’ll update the WordPress.org files and
   close this issue. (and while you’re there please Star the project on GitHub!)
 * Thanks!
 * – Jared
 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156976)
 * Can you confirm that this solved yr issue? I’d like to resolve this thread. Thanks!
 *  Thread Starter [Donghyeok Kang](https://wordpress.org/support/users/wolfkang/)
 * (@wolfkang)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156978)
 * It works. Thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Something wrong in the TimberTerm.get_link() function’ is closed to new
replies.

 * ![](https://ps.w.org/timber-library/assets/icon-256x256.png?rev=1482054)
 * [Timber](https://wordpress.org/plugins/timber-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timber-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timber-library/)
 * [Active Topics](https://wordpress.org/support/plugin/timber-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timber-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timber-library/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Donghyeok Kang](https://wordpress.org/support/users/wolfkang/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/something-wrong-in-the-timbertermget_link-function/#post-4156978)
 * Status: resolved