Home Forums Plugin Support WP User Frontend Pro Category field wirh categories from certain parent ID

This topic is: resolved

This topic contains 16 replies, has 3 voices, and was last updated by  MDelcour 5 years, 10 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #4305

    MDelcour
    Participant
    Post count: 46

    Hi,
    We have a website with a lot of categories and it will not stay with only these categories. So the solution of excluding certain categories is not a solution for us. So is it possible you can add a option of only showing the categories with a certain parent ID? I'm talking about the category field (dropdown menu) of a form.

    So if i have the following structure:

    • Jobstype(parent)
      • ICT Executive(child)
      • ICT Executive(child)
      • ICT Executive(child)
      • ICT Executive(child)
    • News
    • Others

    I only want to show the results of the subcategories of Jobtype.

    #4341

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry for replying late. I am not sure if it'll work or not, open render-form.php and see the function taxonomy in line 1213, you'll see there are some exclude option in line 1243, 1266. Change the exclude text to include (not the variables). See if it works.

    #4461

    MDelcour
    Participant
    Post count: 46

    Hello Tareq,

    It is no problem. I managed to change it to include and it worked to show the category you fill in. But my question was if it was possible to insert a parent ID, so that all its sub categories show in the list. not the filled in category id but the categories which are a sub category of that category.

    #4462

    MDelcour
    Participant
    Post count: 46

    Here I am again, while testing out I found the solution. I changed the “include” to “child_of”.

    But still my question remains, can you add a checkbox or something so that it uses parent id or simply the category id of categories you want to show/not show. Because my guess is that when i update the plugin, my changes will be replaced.

    #4471

    Tareq Hasan
    Keymaster
    Post count: 2831

    Yes, your changes will be lost if you update. There are many possibilities and many combinations might be possible if you I put any checkbox or any option. I need to thin about it ๐Ÿ™‚

    #4530

    MDelcour
    Participant
    Post count: 46

    Hello Tareq,

    Oh than that's not a solution for us. You could make it this way:

    a drop down selection above the field of the category with the following values: insert,exclude,child of

    than in the code you could do the following:
    ‘class' => $taxonomy,
    $categoryselection => $exclude,
    ‘selected' => $selected,

    simply replacing the text with a variable.

    I hop you can implement this.

    #4557

    Tareq Hasan
    Keymaster
    Post count: 2831

    Thanks for the idea

    #5399

    ProUser
    Participant
    Post count: 17

    I need this same exact feature as described in the original post. I need to be able to set this option in the frontend form editor just as we currently can set excluded categories.

    My category structure will be continuously growing and I can't keep tracking categories added by other authors and then add those IDs to the exclude field.

    Thanks for your attention to this issue and for writing a great plugin! ๐Ÿ™‚

    #5440

    MDelcour
    Participant
    Post count: 46

    Yes would be nice if this would be implemented!

    #7778

    MDelcour
    Participant
    Post count: 46

    Tareq Will this feature be included some day?

    #7783

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry for the delay as the development is currently paused. It'll be started again and this feature is on the to-do list ๐Ÿ™‚

    #7821

    MDelcour
    Participant
    Post count: 46

    Aaah ok Tareq, well great to hear ;)!

    #8295

    Tareq Hasan
    Keymaster
    Post count: 2831

    Version 2.1.8 has just been released and this feature is included ๐Ÿ™‚

    #8316

    MDelcour
    Participant
    Post count: 46
    This reply has been marked as private.
    #8317

    MDelcour
    Participant
    Post count: 46
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 17 total)

The topic ‘Category field wirh categories from certain parent ID’ is closed to new replies.