Atributes for a

  • Author
    Posts
  • hector

    Hi.
    Sorry ihor, but I have more questions.
    When I add attributes to an ad and they are of type select, this taxonomy has a hierarchical structure. But when I activate the search option, it appears in the search form in flat format. The hierarchical option is lost.

    Example in ad form:
    Option
    -Suboption1
    -Suboption2

    Example in search form:
    Option
    Suboption1
    Suboption2

    The other question is that in the post_meta table, when saving the values of the taxonomy in an advertisement, encoded data is generated in said table:

    “554”,”119″,”_transient_hp_models/term/listing_my_taxonomy/39da96fa5eddc54b71a7aee2065258e9″,”a:2:{i:0;i:25;i:1;i:24;}”
    “555”,”119″,”_transient_timeout_hp_models/term/listing_my_taxonomy/39da96fa5eddc54b71a7aee2065258e9″,”1594636077″

    How can I access to that post meta if it has an aleatory code (39da96fa5eddc54b71a7aee2065258e9)? How can i read or edit that info in my own plugin?

    Thank you very much for your help.

    ihordeveloper

    Hi,

    1. There’s no support for hierarchical attributes yet, please consider using listing categories instead (if this is the main listing attribute).

    2. This is the HivePress cache, it stores term IDs to avoid duplicated queries. It’s not persistent, please don’t query cache values directly, you can try using this WP function instead https://developer.wordpress.org/reference/functions/wp_get_object_terms/ or use HivePress models API.

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

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.