call pll_get_term(); from a non-category page?
-
Hey there!
I tried to call pll_get_term($term_id, $slug); from a non-category page like the 404. I want to link people back to a specefic category if they get to a 404 page. Also tried to create a link from the home url, but both didn’t work out for me.
This is the button which should link th the category:
<a href="<?php echo pll_get_term(162, $slug); ?>"><?php _e( 'go to this category!', 'textdomain ); ?></a>
Best,
David
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘call pll_get_term(); from a non-category page?’ is closed to new replies.