Forums Forums Search & Filter Pro Meta key not updated

Tagged: ,

Viewing 5 posts - 11 through 15 (of 15 total)
  • Anonymous
    #268065
    This reply has been marked as private.
    Trevor
    #268187
    This reply has been marked as private.
    Anonymous
    #268191
    This reply has been marked as private.
    Trevor
    #268321

    Do I know why what happens? That more than one term is in the custom field separated by the | bar? That would be the way that the system you are using to add the posts works. Whoever wrote that did not write it in a way to store data in the standard WordPress serialised data post meta storage format. WordPress has a standard, but coders are not obliged to follow it, and some choose to store data not as serialised data but as string separated values instead.

    I am not entirely what you have in mind with the sorting of sub-category, but such sorting is not easy. If data terms are stored as a taxonomy (product category is a taxonomy), they cannot be sorted, as taxonomy data in WordPress are stored as serialized data (multiple terms, like an array) per post (which term in the array would you sort by?). Even if only one term per post is used, WordPress still stores them like this. Sorting is generally possible only if that data is in a custom field and there is a single term per post.

    You can make a form restricted to a single taxonomy using our Exclude options, but that can become problematic with its children (sub categories). Generally, it is not a good idea to have a single taxonomy with multiple sets of parent to child groups. It is better to have separate taxonomies for each parent, with just the child terms in that taxonomy. So, for example, rather than have makes and models of cars as a single taxonomy, you would have makes of car as one taxonomy, and models as another taxonomy.

Viewing 5 posts - 11 through 15 (of 15 total)