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.
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?
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 not http://books.dillypress.com/book-category/intermediate/.
The page, http://books.dillypress.com/blog/dillybooks_category/intermediate returns 404 not found.
Please test and fix it.
Thanks.
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
… let me know if it works for you and I’ll update the ww.wp.xz.cn files and close this issue. (and while you’re there please Star the project on GitHub!)
Thanks!
– Jared
Can you confirm that this solved yr issue? I’d like to resolve this thread. Thanks!