Hello. Thank you for contacting the Toolset support.
As I understand - when user click on the "lamb-queen" link, you want the user to redirect back to the following page:
- hidden link
If this is correct - can you please share admin access details and let me check how you added the taxonomy link.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Can you please share the whole flow from what page you start and to what link you want to click and what you want to see when there are multiple terms assigned to post.
Can you please share all those step by step information with URLs and let me see what we can do.
OK I have something close but the term is not working
add_action( 'wp', 'wpso_71266569' ); //hook into wp's init action hook
if ( ! function_exists( 'wpso_71266569' ) ) {
function wpso_71266569() {
//Let's make sure we're on a taxonomy "vendor category" page:
//Either taxonomy-{taxonomy}.php or taxonomy-{taxonomy}-{term}.php.
if ( is_tax( 'vendor-category' ) ) {
$term = get_term( get_queried_object_id() ); //Retrieve the current term slug.
wp_redirect( '/vendors/?_filter_vendors_category=($term->slug)'); //eg: Redirect to hidden link.
I'm afraid that we are not allowed to debug such custom code and its beyond the scope of our support policy. If you need custom programming for your project, you're welcome to contact any of our certified partner:
- https://toolset.com/contractors/
I managed to figure this one out. I have made it less specific so that other users may find it useful. The intention is to redirect an archive link to a page that is filtered. This helps if you are using a faceted search tool.
/**
* Redirect term page to the corresponding custom slug page with query.
* *
* @since 1.0.0
*
* @param void
* @return void
*/
add_action( 'wp', 'efm_243612' ); //hook into wp's init action hook
if ( ! function_exists( 'efm_243612' ) ) {
function efm_243612() {
//Let's make sure we're on a taxonomy "my category" page:
if ( is_tax( 'my-category' ) ) {
$term = get_term( get_queried_object_id() ); //Retrieve the current term slug.