Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Sorry for the inconvenience. Please clarify what exactly you mean by “the link does not open” and we will check in more detail.

    As for your question, you can use this hook: hivepress/v1/fields/select/display_value. Also, please check this doc.

    Thread Starter delanthear

    (@delanthear)

    Great. That worked. If anyone needs the code to turn them ito lists, this seems to work:

    // change way the attributes are output
    add_filter( 'hivepress/v1/fields/checkboxes/display_value', function( $value ) {
    if ( is_string( $value ) && strpos( $value, ',' ) !== false ) {
    // Convert CSV values into an unordered list
    $values = explode( ',', $value );
    return '<ul class="hivepress_attribute_list"><li>' . implode( '</li><li>', array_map( 'esc_html', $values ) ) . '</li></ul>';
    }
    return $value;
    }, 10, 2);

    Please clarify what exactly you mean by “the link does not open” and we will check in more detail.

    I presume you’re meaning where I said the registration link wouldn’t work? It’s working fine now, but last night I couldn’t sign up an account, or use my github one. I’d either get errors where the hcaptcha wouldn’t load, or just random errors that didn’t make sense with what I’d submitted (missing fields which were filled in!)

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

The topic ‘Code snippet for attributes in a list’ is closed to new replies.