Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #139935

    Harry B
    Participant

    Hello,

    I am trying to figure out the best way to query my portfolio items. I have several portfolio categories, but most of them share the same portfolio TAG. I would like to be able to query the portfolio category and pull only the portfolio items that have that TAG. Instead I am pulling all categories when I click the TAG. An example: I have portfolio parent categories for churches (filtered by denomination child category ), restaurants (filtered by cuisine child category), and parks (filtered by amenities child category). My portfolio tags are based on location; I want to only pull the “Japanese restaurants” that are located in “Alden Bridge”, the “Baptist Churches” that are in “Alden Bridge”, or the “Parks with Fishing” in Alden Bridge. I do not want to pull every portfolio item that is tagged “Alden Bridge” when I click on that tag on the “Restaurants Portfolio Page”. Any ideas would be greatly appreciated. I know I can create a custom post type for each parent category instead, however then I would have to create a custom page template for each parent category. The taxonomies would then be independent. I was wondering if you have an alternative solution. code snippets, custom fields, or custom taxonomies that might be a more efficient fix. Thanks solo much for your help. I can’t afford to lose any more hair!!!

    Harry

    #140077

    Rad
    Moderator

    Hi Harry,

    Thanks for posting in.

    I can help you creating a template for custom taxonomy. It is simply duplicating index.php and template parts, renaming them to be as taxonomy template. But, I’m not really sure about category query. Kind of confusing to me. Are you referring nested query based on child? Or should show child category and under its parent category?

    Maybe more detail, mockup, or sample could help me understand the requirement 🙂

    Let me know.

    Cheers!

    #140249

    Harry B
    Participant

    Thanks for your response. I want to develop a city guide. I would like to display RESTAURANTS (parent category) that are filtered by CUISINE (child category) and tagged by their location. I want to do the same for CHURCHES (parent category) filtered by denomination (child category) and also tagged by location. I would do the same for parks, schools, shops etc.

    The categories work fine. It’s when I click on the tag (LOCATION) that I have the problem. The query pulls all categories for this location. I only want to pull (the posts or portfolio items) that are in the same category and same location.

    I feel that I would have to create 3 custom page templates (index, single, and archive) for every category (custom post type) in my new directory.

    I was hoping there would be some way I could circumvent this with a custom taxonomy, custom field, custom permalink; anything to avoid having to create so many new custom post types, and custom page templates.

    If you can’t think of a better way I would really appreciate if you could tell me which templates I am going to have to duplicate or modify. (Index, single, archive)

    I will be duplicating the _portfolio template (I like the isotope filtering) – I noticed there was an isotope script, I am sure is tied to these templates as well..

    I really need your help!

    How would you do this? How would you display all the Japanese restaurants that are in New York without displaying the shops that are in New York too?

    Cheers,

    Harry

    #140415

    Cousett
    Member

    This is possible by setting up your categories with those levels of specificity. So for a park in austin categorize it with Austin, Park, Fishing this will allow it to be filtered by those categories.

    #140664

    Harry B
    Participant

    I am not sure I understand you correctly. I think what you are saying is that I combine the child categories with location. So for a “parks” page the filters would be:

    Swimming Pool, Fishing, BBQ Pits, Picnic Tables, Tennis Courts, Basketball Courts, Volleyball Courts, Disc Golf, Horseshoes, Jogging Track, and Austin, Dallas, Houston, San Antonio, Midland, Corpus Christi, El Paso etc.. That’s a lot of filters.

    So when I click on the Houston filter I pull up all the parks in Houston. How do I pull all the parks with swimming pools in Houston?

    Why wouldn’t I be pulling all restaurants, schools, churches etc. when I click Austin?

    I am sorry I am a little confused.

    Harry

    #140899

    Rad
    Moderator

    Hi there,

    Here are the files you will have to duplicate for taxonomy,

    1. index.php
    2. /framework/views/{STACK}/wp-index.php
    3. /framework/views/global/_index.php
    4. /framework/views/global/_script-isotope-index
    5. /framework/views/{STACK}/content.php

    Remember to change their coding, matching the renamed files. ( https://theme.co/x/member/kb/customization-best-practices/ )

    I’m still confused by your requirement. Does your query should display child category of selected parent category? Or posts of selected category. Or could be just want a multiple portfolio page? https://theme.co/x/member/kb/portfolios/

    Like this:

    1. Create your desired categories (eg. Audio, Music)
    2. Create pages with Layout – Porfoliio and then under Portfolio Settings > Category Select, select your created category.
    
    Each category must be equivalent to single page (eg. /audio/ page is to Audio category, and /music/ page is to Music category)
    
    3. Now add your created pages to your navigation menu under Portfolio.
    
    4. Edit your promo shortcode and add button shortcode linked to each pages you created ( /audio/, /music/ )
    
    5. Add your portfolio item selecting your target category (Audio), and its parent portfolio (/audio).

    And simply creating page for sub category too?

    Thanks.