BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 4
    Irene on #715

    That must be display on single post page.

    Right now I’m getting the values typed in, in the form (dashboard/custom post type and field)
    – These values should be types in from their buddypress profile.

    I’m using this code on single-cpt.php – Which is showing the final post:

    <h4> Price: <?php echo types_render_field('show-price'); ?> EURO </h4>

    where ‘show-price’ is the slug from types’ custom field group.

    On their individual pages, under blog (buddyblog) is there a list of the posts that user has created.
    When clicked it goes to the single-cpt page.

    Hope that makes sense.

  • Participant
    Level: Initiated
    Posts: 4
    Irene on #713

    Maybe I was a bit to fast there…

    I get it to the user blog/post page, but only date and text shows like textfields.

    But none af the data I type in there, will get to the single-cpt.php?

  • Participant
    Level: Initiated
    Posts: 4
    Irene on #712

    Okay, I think I get it now. Thank you so much.

    I created a select with two options, and it pops up for the user. Yaaah!

    However I get this error:
    Warning: Invalid argument supplied for foreach() in wp-content/plugins/bp-simple-front-end-post/core/classes/class-edit-form.php on line 523

    This one was only for testing, so maybe I just need to type in some info
    Maybe you would like to know 🙂

    Again thank you!!

  • Participant
    Level: Initiated
    Posts: 4
    Irene on #710

    Thanks Brajesh.
    And thank you for a swift reply 🙂

    It made me a bit more confused..
    That filter you have added here, where should I upload that?

    My post type has created with this plugin –
    https://wordpress.org/plugins/types/
    It saves the fields in fields group, does that make any difference?

    I have created a test field with a textfield called testcf.
    And uploaded to my-functions.php

    So the code should be like this, right;

    add_filter( ‘buddyblog_post_form_settings’, ‘buddydev_custom_buddyblog_settings’ );

    function buddydev_custom_buddyblog_settings( $settings ) {

    $custom_fields = $settings[‘testcf’];

    $custom_fields[‘new_meta_key’] = array(
    ‘type’ => ‘text’,
    ‘label’ => ‘test custom field text’,
    ‘default’ => ”
    );

    //and repeat

    //then update settings

    $settings[‘testcf’] = $custom_fields;

    return $settings;
    }

    But I don’t get any result..