WordPress.org

Forums

Custom Taxonomy Search Results, Search the loop results from a template page (1 post)

  1. RyanJBaron
    Member
    Posted 4 years ago #

    Ok, so here is the problem. I created a custom taxonomy to add staff members. Those staff members are then displayed on a custom template page using a loop. However when somebody searches and a staff name comes up in the results the link takes them to the individual staff member page. But I would like it to take them to the main staff page, and not the individual page. I made a if anyone has a solution that would be awesome. Below is one idea I have implemented, and another one that I considered using, but neither of them are the clean solution that I am looking for. If anybody has any other ideas that would be great!

    1. I currently have a header-staff.php page which redirects the user to the main staff page using this code [meta http-equiv="REFRESH" content="0;url=http://websitename.com/staff/"], but there is a slight delay before the redirect.

    2. I have also considered disabling the custom taxonomy from the search results in the functions.php file, and then typing the names of staff members in the main content area of the "staff" page, and then hiding that content on the actual page itself, but in the long run this just doesn't seem like a good solution.

    If anybody has any other good ideas or a solution that would be awesome. Thanks in advance!

    Ryan

Topic Closed

This topic has been closed to new replies.

About this Topic