Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro How can I get the id of these categories if I know the id of the post?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Rozhnov Vyacheslav
    #212816

    Hi. How can I get the id of these categories if I know the id of the post? http://dl3.joxi.net/drive/2019/05/30/0021/2102/1402934/34/41d29f2ccf.jpg

    Trevor Moderator
    #212820

    Just to confirm what you want is understood by me correctly. You have the post ID of the form, and you want to know the list of Post Category term IDs that have been ‘included’ in its settings?

    I will probably need to ask the plugin developer, Ross, if there is a method you can use to fetch these, if you can first confirm I understood you inquiry correctly?

    Rozhnov Vyacheslav
    #212830

    Yes that’s right

    Rozhnov Vyacheslav
    #213113

    Hi Trevor. Do you have information on my question?

    Ross Moderator
    #213141

    Hi Rozhnov, I will be on this ticket later on today and should be able to provide a code sample.

    Thanks

    Ross Moderator
    #213169

    Hi Rozhnov

    You can access the search form settings like this:

    global $searchandfilter;
    $searchform = $searchandfilter->get(123456);
    $taxonomies_settings = $searchform->settings("taxonomies_settings");
    if(isset($taxonomies_settings['category'])){
    	var_dump($taxonomies_settings['category']);
    }

    Note, this is undocumented right now, and not really supposed to be in production as we’ll likely be changing the the methods for this in our next major version – after which we will add the methods to the docs, so when that is released you will need to update this code.

    Thanks

    Rozhnov Vyacheslav
    #213188

    thank

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.