Forum: F.A.Q

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

Display Only Certain Taxonomies on Results Page (Instead of All)?

Forums F.A.Q Display Only Certain Taxonomies on Results Page (Instead of All)?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37992
    squints
    Member

    I am building a business directory similar to YP (but free) and I am using Geo My WP for my frontend search form so my users can find a business in there area. Currently the results page displays ALL of the taxonomies associated with each business and I only want to display a certain few of the custom taxonomies on the results list page since I have quite a few custom taxonomies associated with each listing and it looks weird in the results. I only want to display a few certain taxonomies in the results list and if the user wants more info they can click the business name to see all the other taxonomies/info.

    The taxonomies are displayed on the results page using the following function:
    and in “settings” there’s only the option to display all taxonomies or none.

    How can I either edit this function so that I can specify which taxonomies to display and which ones to exclude, or replace the function with something else that can pull individual taxonomies rather than ALL of them.

    For example; currently each listing has the following taxonomies: Days, Times, Categories, Services, Zip Code, Features, Rental, Customer Service, Drive Through, Size, Building/Strip Name, Number of Employees, Etc.

    But the only taxonomies I want to display on the results pages are Days, Times, Categories and Services.

    Any help is greatly appreciated!!

    #37993

    Hi,
    The function includes a filter which allows you to pass only the taxonomies that you’d like to display.

    the filter is:

    You will need to use the function to return an array of the taxonomies that you want to use.

    #38007
    squints
    Member

    Doesn’t the function get_object_taxonomies return all of the taxonomies associated with a post? I tried to play around with this function but I do not understand where to list the taxonomies I want to include or exclude. Can you please give me an example of how to structure this function to either include or exclude taxonomies?

    Also, am I supposed to make the change to geomywp/plugins/post/includes/gmw-pt-template-functions.php?

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.