Portfolio Filter with category parent/children only

Support Forums for LiveMesh Themes & Plugins Forums Extinct Theme Support Portfolio Filter with category parent/children only

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #2704
    dvhughes
    Member

    Hey livemesh,

    I was wondering if it was possible to insert a shortcode for a portfolio page that would isolate the filterable results to exclusively the parent category and the children of that category.

    Currently, if I insert:
    [show_portfolio number_of_columns=3 post_count=12 image_size='medium']
    It will list all categories as filter options.

    Is a custom template the answer?

    #2713
    livemesh
    Keymaster

    Hey – I don’t have a way right now to use filter when you have only certain categories listed in a page. May be you don’t need a filter when the portfolio items belong to a category and it’s children only. Here is the discussion of the shortcode you should be using to display portfolio items belonging to a one or more categories –

    https://www.livemeshthemes.com/support/forums/topic/getting-portfolio-with-slugs/

    Hope that helps. Thanks

    #2716
    dvhughes
    Member

    Unfortunately, my client has an extensive portfolio with many categories. The best solution I had was to isolate category families and create a portfolio page for each.

    I read the above thread several times while researching a solution and it is now in use for the home page “recent work” portfolio previews, but it is a clumsy fix for a large category family.

    So there is nothing I can add to an existing “…sorted-full-width.php” that would only call specific categories? That is too bad.

    I will ponder my options some more.

    Thanks for your input.

    #2717
    dvhughes
    Member

    Any reason why portfolio item thumbs would not be loading chronologically on a page? (Newest entry thumbs in the top left, oldest bottom right.) It seems random. Absolutely maddening.

    Suggestions?

    #2721
    livemesh
    Keymaster

    Only thing you will lose by using the [post_snippets] shortcode is pagination but otherwise it’s all same code working beneath. If you do not have a need for pagination, I would urge you to consider it as valid use. If “recent work” is not a good example but here is a better one as an example of how this shortcode works –

    https://www.livemeshthemes.com/extinct/portfolio-shortcodes/

    The shortcode is pretty versatile. If you want to still create a separate template with category filter, give me couple of days time and I will be able to get something done wherein you can specify the categories for a portfolio template. Since this is a popular request, I can make this process a little easier for everyone with your help. Hope you can wait.

    #2722
    livemesh
    Keymaster

    Regarding the order of portfolio items, I went back to the demo site –

    https://www.livemeshthemes.com/extinct/ajax-portfolio-three-columns/

    and checked for time and date and order in which the items are laid out and it has always been most recent ones first and then the older ones with oldest one coming last. And this works to the date, hour and minute the portfolio item is created (not just date). Pls recheck and confirm this for me that order is an issue (I request you to do this since, surprisingly, this was never reported for any of my themes). If you still seeing this issue, I can login to your site and check what’s happening. Thanks.

    #2731
    dvhughes
    Member
    This reply has been marked as private.
    #2733
    dvhughes
    Member

    If you want to still create a separate template with category filter, give me couple of days time and I will be able to get something done wherein you can specify the categories for a portfolio template. Since this is a popular request, I can make this process a little easier for everyone with your help. Hope you can wait.

    Christmas comes early!
    This would be absolutely fantastic.
    I would be happy to help out anyway I can.

    #2744
    livemesh
    Keymaster

    Regarding the ordering, my mistake saying the order is preserved based on date and time – I implemented a change for a buyer who wanted to control the order of the items and made the change this change in the file utility-functions.php at line number 450 –

    From

        $query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'], 'paged' => $paged);
    

    to

            $query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'],
                'paged' => $paged, 'order' => 'ASC', 'orderby' => 'menu_order');
    

    This will help order the portfolio items by specifying the the order in which the items need to be shown. My assumption was that WP would sort automatically based on date if the order was zero but looks like it does not, at least not in all situations. So, if you want to, you can reverse this change OR better, specify the order in the portfolio edit window like this –

    https://www.evernote.com/shard/s350/sh/cbb86d51-1016-4a11-9d79-850f19fe71c1/e123a54d7fdf677523a62a7147a204cb

    Have made some changes to your portfolio items towards the order and things are working as expected. Thanks

    #2746
    livemesh
    Keymaster

    Regarding the warning, it occurs when there is no portfolio category specified for an item. Will take care of this in the next update. For now, I have set the portfolio category for the two items and you should not see the warning. Thanks.

    #2769
    dvhughes
    Member
    This reply has been marked as private.
    #2782
    livemesh
    Keymaster

    So are you saying that changing the code in utility-functions.php at line number 450 to –

        $query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'], 'paged' => $paged);
    

    did not fix the issue? I could try it here but I cannot reproduce the ordering issue somehow on any of my installations when the above code is in place (all themes of mine except Extinct have the above code and hence I can revert back to the old one for Extinct too if custom order is no big benefit for most). And again, have not had anyone report it so far honestly.

    #2786
    livemesh
    Keymaster
    This reply has been marked as private.
    #2789
    dvhughes
    Member
    This reply has been marked as private.
    #2791
    dvhughes
    Member

    Ok…I think I have narrowed down the issue.

    As stated above, I swapped out the code in line 450 as suggested. (It is now the shorter code you posted in reply #2782)

    The portfolio entries (in the portfolio templates) load as one would expect, last first, when inside a defined portfolio template. Beautiful. No problems there.

    However, the “recent work” portfolio shortcode in the home page seems to disregard post times and loads entries at random. (If a tag term is specified, it loads those tags at random.)

    Maybe there is something amiss in the homepage code that I unwittingly screwed up?
    Here is that code:

    [segment][show_post_snippets post_type="portfolio" number_of_columns=4 post_count=7 image_size='medium' excerpt_count=100 display_text="true" show_excerpt="true" hide_thumbnail="false"  post_type="portfolio" intro_text="
    
    Our Recent Work
    
    Here is a small sample of our most recent work. Be sure to check out our entire portfolio to get a better understanding of what we can create just for you."][/segment]

    If the entries in the general portfolio templates loaded randomly, I don’t think I would mind that much. But a “Recent Work” shortcode should definitely be loading the most recent first.

    I know that development is an ongoing process and I do not expect solutions overnight.
    Your work is genuinely appreciated.

Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘Portfolio Filter with category parent/children only’ is closed to new replies.