BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 13
    Peter on #27763

    OK. It works.

    I had a normal text field and no multi-line.

    Would it also work with a one-line text field?

  • Participant
    Level: Initiated
    Posts: 13
    Peter on #27757

    HEllo,

    i canĀ“t find a file with the name: bp-custom.php

    Regrads

    UPDATE:
    I created the file and then uploaded it to the wp-content / plugins folder
    – ` <?php
    // hacks and mods will go here
    add_filter( ‘xprofile_get_field_data’, function ( $value, $field_id, $user_id ) {

    if ( 3 != $field_id || is_array( $value ) ) {
    return $value;
    }

    return do_shortcode( $value );

    }, 10, 3 );
    ?> `.

    But the shortcode is not displayed.
    The field remains empty

    • This reply was modified 4 years, 1 month ago by Peter.
  • Participant
    Level: Initiated
    Posts: 13
    Peter on #27754

    Thanks in advance I will test it.
    Could you just tell me what 10 and 3 means at the end of the code?

    Then the question is this code flexible if I have the field ID 6,7 or 8?

    Do I only have to change the 5 in the code?

    Regards
    Peter

  • Participant
    Level: Initiated
    Posts: 13
    Peter on #27702

    At this Example the field_id are 5
    field id=5 and groupe id=2

  • Participant
    Level: Initiated
    Posts: 13
    Peter on #27593

    Basically, it should be such that only the admin can fill this field.

    I used e.g. the Football Leagues plugin.

    Here there is a short code of clubs or tables.

    I would like to display this club or table in the user profile page.

    The shortcode looks like this:
    [anwpfl-clubs competition_id = "" logo_size = "big" logo_height = "50px" logo_width = "50px" exclude_ids = ""]

    Now I have created a field with the name: Club.

    Title: Club
    Type: Text area
    Meta name: user_verein

    If I now enter the shortcode, I will not see the club but only the shortcode.

    • This reply was modified 4 years, 1 month ago by Peter.
    • This reply was modified 4 years, 1 month ago by Peter.