Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can the feature suggested by divaksh please be added in this plugin?

    Perhaps a new function can be added where the first author (original author) will have its own ‘before’ parameter, and the rest of the co-authors will have their own the same ‘before’ parameter?

    So we can put like coauthors_posts_links_orig_author_plus(‘by’,….,’edited by’);

    Display: by Orig Author, edited by Someone

    Thank you.

    Thread Starter jesstura

    (@jesstura)

    i still have question but not related to my title of this post. Can we just delete this thread as i think it will not be helpful to anyone at all?

    i will post my new question as a separate thread.

    Thread Starter jesstura

    (@jesstura)

    Thanks Justin for the quick reply. Your response made me realize that i am actually doing wrong…still confuse here.

    Basically, I was trying to make one custom field (I named it as Day_Time). This one custom field has three html elements in it:

    1) select = contains Sunday through Saturday options
    2) text_time = for the Starting Time
    3) text_time = for the Ending Time

    This is for the Scheduling kind of interface. I took the idea from the example here: Adding your own field type–Multiple Inputs, One Field, where there are many inputhtml elements (plus selectfield) but are considered as just one field, namely address.

    Any advice on how to do it?

    Also, how is the field configuration for the custom address field in your sample? Is it like below? or something else?

    add_action( 'cmb2_init', 'demo_address_field' );
    /**
     * Hook in and add a demo metabox. Can only happen on the 'cmb2_init' hook.
     */
    function demo_address_field() {
    
        // Start with an underscore to hide fields from custom fields list
        $prefix = '_demo_';
    
        /**
         * Sample metabox to demonstrate each field type included
         */
        $cmb_demo = new_cmb2_box( array(
            'id'            => $prefix . 'metabox',
            'title'         => __( 'Test Address', 'cmb2' ),
            'object_types'  => array( 'post', ), // Post type
            'context'       => 'normal',
            'priority'      => 'high',
            'show_names'    => true, // Show field names on the left
        ) );
    
        $cmb_demo->add_field( array(
            'name'       => __( 'Address', 'cmb2' ),
            'id'         => $prefix . 'address',
            'type'       => 'address',
       ) );
    }
    Thread Starter jesstura

    (@jesstura)

    Thank you so much, Chris! That solves the problem.

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