• Resolved mdun234

    (@mdun234)


    Is there a way to use this plugin to only display categories that the post actively has?

    For example:

    There’s a category “Category” with sub-categories “SubA, SubB, SubC”. The post in question is marked as having SubA and SubC.

    When using this plugin, and selecting to show Subcategories of Category, the results display “SubA, SubB, and SubC”.

    Is there a way to modify the shortcode so that it displays just “SubA and SubC”?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    I don’t quite follow what you mean so let me try to get this straight:

    • You have a category “CatA”
    • It has subcategories “SubcatB”, “SubcatC” and “SubcatD”
    • You have a shortcode [catlist name="CatA"]

    And, for example, you would like to list only the posts that have “SubcatB” and “SubcatC”.

    So why don’t you just do [catlist name="SubcatB,SubcatC"]? It will achieve exactly what you are looking for.

    Thread Starter mdun234

    (@mdun234)

    Sorry, let me try to do a better job of explaining. My apologies.

    I’m building an index of coaches. There are multiple categories available, including years of experience, sports they coach, etc.

    Lets pick one category to focus on, sports they coach. The available options are Basketball, Baseball, Tennis, Golf, Soccer, and Boxing. I’ve created the category “Sports” with the child categories “Basketball, Baseball, Tennis, Golf, Soccer, and Boxing”. I’ve also created parent/child categories for the others, but lets just focus on this one.

    John is a coach, and Lisa is a coach. John coaches Basketball, Baseball, and Tennis. Lisa coaches Tennis Golf and Soccer.

    On John’s profile page, i’ve put the shortcode [catlist child_of="32" ] because the categoryID for “Sports” is 32, and I was expecting it to show Basketball Baseball and Tennis (which are the children of 32) but instead it’s showing not just Basketball Baseball and Tennis, but also Golf and Soccer, because Lisa is listed in those categories.

    Ideally, on John’s page it will show just his 3, and on Lisa’s page is will just show her 3. I have a large number of coaches and categories being indexed in this system, so i’m trying to make sure it’s as efficient as possible.

    Hopefully this helps to get across what I’m trying to do. Thanks again for your help!

    Plugin Contributor zymeth25

    (@zymeth25)

    On John’s profile page, i’ve put the shortcode [catlist child_of=”32″ ]

    Are you sure? There is no such parameter as child_of. Have you read the documentation?

    Thread Starter mdun234

    (@mdun234)

    ok clearly i’m a fucking idiot. I was apparently using your plugin “list categories” not “list category posts”. Let me see if I can get it working now.

    Thread Starter mdun234

    (@mdun234)

    Hi again –

    Thanks for your previous pointing in the right direction. I hadn’t found the documentation on the git page but it does have the answers I needed.

    However, I’m not sure what’s going on, because now when I run the shortcode [catlist id=53 categorypage="yes"] instead of getting the output of the categories, it’s only displaying the name of all of the posts (including posts that don’t have that specific tag). It’s doing this regardless of which id i set it to, or if i try to use the category slug instead.

    I did try to uninstall and reinstall the plugin, as well as to delete the incorrect other plugin that I’d had installed.

    Any recommendation?

    Thanks

    Plugin Contributor zymeth25

    (@zymeth25)

    Yes, this plug-in “List Category Posts” is for listing posts. It doesn’t list categories, if what you want is a list of categories then this plug-in cannot help you. The plug-in List Categories which you tried to use earlier is for listing categories, although I understand that it doesn’t support the feature that you need. Nonetheless here on this support forum I cannot help because the LCP plug-in is for listing posts.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Display Only Checked Categories’ is closed to new replies.