• Resolved chr22320

    (@chr22320)


    Hello,
    i ask for your support for the following problem:

    I have the Rocket Board template that comes with a portfolio and portfolio categories.
    [show_post_categories show = “taxonomy”] shows correctly
    Custom Taxonomy name for Category: portfolio-category.

    The following syntax also works: [show_post_categories show = “category” taxonomy = “portfolio-category” parent = “yes” hyperlink = “yes”]. With and without the parameter “taxonomy = …” it works without problems.

    However, if I add the attribute “parentcategory”, the plugin will not show anything on the portfolio page anymore. [show_post_categories show = “category” taxonomy = “portfolio-category” parentcategory = “tasks” parent = “no” hyperlink = “yes”]

    The portfolio category is structured as follows:
    tasks
    – Controlling
    – Purchase
    – Finance and Law
    ….
    business
    – Construction
    – Chemistry and raw materials
    – Services
    ….
    And 3 more categories consisting of main and sub categories.

    versions:
    PlugIn: 2.2.4
    WordPress: 5.2.2
    Rocket Board: 1.10

    Each portfolio entry has its own mix of major and minor categories. However, I want to address in a row only one main category.

    I would appreciate your support, thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author willemso

    (@willemso)

    Hello chr22320

    Thank you for using “Show Post Categories” !

    I’ve simulated your use case with a random portfolio plugin called “Visual Portfolio” as “Rocket Board” seems to be a premium theme.

    I can confirm that Portfolio’s seem to cause some unexpected behaviour for; taxonomy and parentcategory. However I believe you can solve your issue by using the following shortcode:

    [show_post_categories show="category" taxonomy="portfolio-category" parent="no" hyperlink="yes"]

    Could you give it a try and provide feedback?

    For the unexpected behaviour I’ll look at ways to give it a better functionallity in case of Portfolio.

    Thread Starter chr22320

    (@chr22320)

    Hello willemso,

    many thanks for your response! [show_post_categories show = “category” taxonomy = “portfolio-category” parent = “no” hyperlink = “yes”] works fine. All subcategories of all major categories are displayed. The main categories itself are not displayed, which is fine.

    If I then add the filter parentcategory = “tasks” to get only the subcategories of this one main category, then nothing is displayed anymore.

    Do you have any further idea? Thanks! Best regards Christian

    Plugin Author willemso

    (@willemso)

    Hi Christian

    Ok, I thought you linked only 1 set of Parents to the post.
    After some debugging this seems to be caused due to the custom taxonomy.

    To fix this I would need to rewrite a large part of code, with impact to the main function; returning post categories. So this will take some time to do (some weeks).

    I can however tell you what part to modify in my code to fix your issue.
    Basicly you need to replace:
    if(cat_is_ancestor_of($ParentCatID , $category) || $category->term_id == $ParentCatID)
    With:
    if($category->parent == $ParentCatID || $category->term_id == $ParentCatID)
    This within the file category.php on line 81.

    You’ll do this easily with the WordPress plugin-editor within your plugins dashboard.

    Plugin Author willemso

    (@willemso)

    Christian,

    I could not let it go 🙂
    There is a new developers version ready for testing, this will solve your issue.

    To use
    Remove the current SPC plugin
    Go to this page: Link
    At the bottom select “developer version”, download it and install to your website

    Please let me know if this helped!

    Thread Starter chr22320

    (@chr22320)

    Hello willemso,
    Please excuse the late reply, but to get straight to the point: Thank you for your help! It works the way I need it now! 🙂 Great work, thank you!
    Best regards
    Christian

    Plugin Author willemso

    (@willemso)

    Hi Christian,

    Thank you for providing feedback. I’ll post a new release when my other projects are done. You will be able to update the developers edition without issues.

    If you have some suggestions or feedback you are always welcome to leave a rating.

    Good luck with your site!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘parameter parentcategory without results’ is closed to new replies.